Skip to content

Improve Combo modal model sourcing for Chutes/Ollama passthrough providers#323

Open
kwanLeeFrmVi wants to merge 30 commits intodecolua:masterfrom
kwanLeeFrmVi:fix/Combo-model-picker
Open

Improve Combo modal model sourcing for Chutes/Ollama passthrough providers#323
kwanLeeFrmVi wants to merge 30 commits intodecolua:masterfrom
kwanLeeFrmVi:fix/Combo-model-picker

Conversation

@kwanLeeFrmVi
Copy link
Contributor

Summary

  • Fix PROVIDER_ID_TO_ALIAS so API-key providers like Chutes, Vertex, Deepgram, etc. resolve to their short aliases (ch, vx, dg, …). This ensures /api/models and the Combo modal use consistent alias/model identifiers.
  • Overhaul ModelSelectModal logic for passthroughModels providers:
    1. Primary source: providerSpecificData.enabledModels from the active connection, matching what the Provider detail page exposes.
    2. Secondary: user-defined modelAliases.
    3. Fallback: static hardcoded models from open-sse/config/providerModels.js.
      All merged with deduping and cleaned display names (strip lab prefixes such as moonshotai/).
  • Refresh Chutes’ static model list to the latest TEE-focused models so users see meaningful defaults when no custom selection exists.

Testing

  • bun dev, navigate to Dashboard → Combos.
  • Open both Create and Edit Combo modals.
  • For Chutes (and Ollama/Vertex), verify:
    • Models selected on the Provider detail page appear first.
    • Custom aliases show up with their friendly names.
    • Static fallback models load when no explicit selection exists.
  • Confirm no regressions for non-passthrough providers.

…t authentication

- Add vertex and vertex-partner providers for Gemini and partner models (Claude, Llama, Mistral, GLM-5)
- Implement VertexExecutor with google-auth-library for OAuth token minting
- Support Service Account JSON credentials with automatic token caching
- Add region and modelFamily configuration via providerSpecificData
- Include provider logos and model definitions for both Vertex variants
@kwanLeeFrmVi kwanLeeFrmVi force-pushed the fix/Combo-model-picker branch 2 times, most recently from 8d4f6d5 to 4456fca Compare March 16, 2026 09:43
kwanLeeFrmVi and others added 19 commits March 16, 2026 16:48
feat: Add Google Cloud Vertex AI provider support
…tner)

Co-authored-by: Quan <quanle96@outlook.com>
PR: decolua#298

Thanks to @kwanLeeFrmVi for the original implementation. Here is a summary
of changes made during review integration:

- Replaced google-auth-library with jose (already a project dependency)
  for SA JSON -> OAuth2 Bearer token minting (RS256 JWT assertion flow)
- Moved auth logic (parseSaJson, refreshVertexToken, token cache) from
  executor into open-sse/services/tokenRefresh.js to match project pattern
- Fixed executor to use proxyAwareFetch instead of raw fetch (proxy support)
- Simplified buildUrl: use global aiplatform.googleapis.com endpoint for
  both vertex (Gemini) and vertex-partner; removed region/modelFamily fields
- Added auto-detection of GCP project_id from raw API key via probe request
  (vertex-partner only, cached per key)
- Added vertex/vertex-partner cases to /api/providers/validate/route.js
- Updated model lists based on live testing:
  - vertex: gemini-3.1-pro-preview, gemini-3.1-flash-lite-preview,
    gemini-3-flash-preview, gemini-2.5-flash (removed gemini-2.5-pro: 404)
  - vertex-partner: deepseek-v3.2, qwen3-next-80b (instruct+thinking),
    glm-5 (removed Mistral/Llama: not enabled in test project)
  - gemini provider: added gemini-3.1-pro-preview, gemini-3.1-flash-lite-preview
- Removed bun.lock (project uses npm/package-lock.json)
- Removed region and modelFamily UI fields (global endpoint, auto-detect)
- Kiro token auto-refresh on AccessDeniedException (from commit 2)

Made-with: Cursor
…lua#315)

* feat: add modelId fallback for provider validation

- If /models endpoint unavailable, validate via /chat/completions
- Add optional Model ID input in EditCompatibleNodeModal
- Improves compatibility with providers lacking /models endpoint

* feat: improve provider validation with modelId fallback

- Add Model ID input for chat/completions fallback validation
- Reorder UI: API Key → Model ID → Check button + Badge
- Display detailed BE error messages in FE
- Add status-specific error handling (401/403/400/404/5xx)
- Add unit tests for error message helpers
- Add vitest devDependency
- Fix alias resolution for providers (chutes, vertex, etc.) by mapping their short IDs in open-sse/config/providerModels.js so modal lookups use the correct “ch/…” prefixes.
- Overhaul ModelSelectModal passthrough logic to prioritize connection-specific enabledModels (with cleaned display names), merge user aliases, and fall back to static models so Chutes/Ollama selections mirror the Provider settings UI.
- Refresh Chutes’ static fallback list to the latest TEE-focused models for a meaningful default set.
- Add isCustom flag to passthrough provider models in ModelSelectModal
- Ensures enabled models from connections are properly identified as custom models
- Prevents filtering issues when selecting models from passthrough providers
…viders

- Add gemini-3.1-pro-preview to Gemini CLI model list
- Add optional projectId parameter to refreshGoogleToken function
- Add Project ID input field in Edit Connection modal for Gemini CLI
- Store projectId in providerSpecificData for Gemini connections
- Pass projectId through token refresh and credential retrieval flows
- Fix indentation in refreshCodexToken function
- Add x-request-source: local header to Gemini CLI executor and provider models endpoint
- Increase model test timeout from 15s to 30s for better reliability
@kwanLeeFrmVi kwanLeeFrmVi force-pushed the fix/Combo-model-picker branch from 5c73cdd to 7c96272 Compare March 16, 2026 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants