Repository navigation
feat(server): claude and codex pickers list models from ollama and other local gateways - #253
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
AadiJo
force-pushed
the
check-ollama-model-picker
branch
from
November 12, 2026 04:56
f773103 to
06a8d05
Compare
…loads the cad tools
…y gateway sessions load cad tools in full
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Users who point Claude Code or Codex at local models through Ollama (or LM Studio, LiteLLM and similar gateways) saw only the built-in Anthropic or OpenAI models in the picker. Picking one failed, because the gateway has no model named
claude-opus-5-5orgpt-6.1-sol.Neither CLI asks the gateway for its models, so the provider checks now do:
ANTHROPIC_BASE_URL(from the shell, or from a Claude settings file'senvblock, which wins), the check callsGET <base>/v1/models.ollamaandlmstudioproviders and custom[model_providers]entries with abase_url. Providers with amodel_catalog_urlare skipped, because Codex lists that catalog itself.If a gateway can't list its models, the picker keeps the built-in ones and the provider status says why. Ids the built-in catalog knows keep their name and options. A model the gateway lists only under another id, such as a proxy's dated
claude-haiku-4-5-20251001, is listed and requested under the id the gateway uses.A gateway that also serves Claude catalog models, such as a proxy in front of Anthropic, keeps the curated picker: those models come first in catalog order, and the gateway's other ids fold under "More models". Without this, a proxy listing 35 ids turned a 12-model Claude tab into 35 unordered rows.
Two changes also reach setups without a gateway:
Behind a gateway, Claude sessions declare the CAD tools in full instead of deferring them behind ToolSearch, which local models never call. Sessions on Anthropic's own API send what they sent before.
Known limitation: a custom launch argument that changes which settings files Claude Code reads is not taken into account when deciding whether a session is behind a gateway.
Proof: the new
apps/server/scripts/gateway-models-e2e.tsruns the dev stack against a real Ollama with freshCLAUDE_CONFIG_DIRandCODEX_HOME, through a logging proxy. It passes with Codex on the built-in provider, on a custom provider, and unconfigured, and with a gateway that lists a Claude model by its catalog id or only by a dated id. In the dated-id run the gateway gets requests for the id it lists; before, it got 28 requests forclaude-haiku-4-5and rejected all of them. Both tabs list exactly the gateway's models, turns reach it as the picked model, Claude's turn declares the CAD tools, and each chat gets a generated title. Typecheck,vp checkand the server suite (1735 tests) pass.Paired against
mainwith the method inCadReviewEvaluation.md(transfer review, eight-item key, three runs per arm, blind grader): Opus 5.5 scored 7.83 on both, GPT-6.1-Sol 8.00 on both. The runs went through a proxy in front of the cloud models, so the branch arm declared the CAD tools in full, and Opus processed 35% fewer tokens per review that way.Reviewed with sol-loop: 16 rounds with gpt-6.1-sol on high. Sol verdict: approved