feat: dynamic model discovery from /v1/models endpoint #1
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: WildDragonLLC/claudecodeui#1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The model picker in cloudcli is hardcoded in
shared/modelConstants.js. When using a proxy endpoint like 9Router (ANTHROPIC_BASE_URL), the UI only shows the 3 hardcoded Claude models (2 Sonnets, 1 Haiku) even though the endpoint exposes 90+ models across multiple providers.Available models (as of 2026-05-27)
Our 9Router endpoint (
https://ollama.wilddragon.net/v1) returns the following fromGET /v1/models:cc/claude-opus-4-7,claude-sonnet-4-6,claude-haiku-4-5kr/claude-sonnet-4.5-thinking,qwen3-coder-next,deepseek-3.2,glm-5cl/claude-opus-4.7,gpt-5.4,gemini-3.1-pro-previewcx/gpt-5.5,gpt-5.4,gpt-5.3-codexds/deepseek-v4-pro,deepseek-v4-flash,deepseek-reasonergemini/gemini-3.1-pro-preview,gemini-3-flash-previewollama/kimi-k2.5,qwen3.5,gpt-oss:120bnvidia/deepseek-v4-flash,kimi-k2.6mistral/mistral-large-latest,codestral-latestjinx/kiro-auto,kiro-claude-sonnet-4-5-agenticag/gemini-3.1-pro-high,claude-opus-4-6-thinkingProposed solution
When
ANTHROPIC_BASE_URLis set, fetch available models dynamically at startup (or on-demand) from${ANTHROPIC_BASE_URL}/modelsand populate the model picker from the response instead of (or in addition to) the hardcoded list.Files to touch:
shared/modelConstants.js— make constants a fallback, not the only sourceserver/routes/— add aGET /api/modelsendpoint that proxies/v1/modelsfrom the configured base URL/api/modelswhen available, fall back to hardcoded listWorkaround
Until this is implemented, model can be overridden via env var: