feat: fetch full model list from gateway for app model picker#1347
Open
MysticCoss wants to merge 2 commits into
Open
feat: fetch full model list from gateway for app model picker#1347MysticCoss wants to merge 2 commits into
MysticCoss wants to merge 2 commits into
Conversation
Populates metadata.models with the complete model catalog from the Anthropic-compatible gateway (/v1/models) so the iOS app shows all available models — provider models, 1M-context variants, and discoverable models — instead of only the 4 hardcoded Claude aliases. The SDK's supportedModels() provides a fallback enrichment for when no gateway is configured (original Claude Code). Co-Authored-By: Happy <yesreply@happy.engineering>
Author
|
@bra1nDump hello, this is a simple but powerful improvement that makes intergration with free-claude-code smooth. Please review it |
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.
Summary
Mobile app's model picker only showed 4 hardcoded Claude aliases (default, opus, sonnet, haiku) — even when connected to a gateway with 100+ available models (using free-claude-code for example). This fetches the full catalog from the
gateway's /v1/models at session start so the app displays every model the gateway exposes: provider models, 1M-context variants, everything. When no gateway is configured, it falls back to the existing
hardcoded list plus SDK-reported models.
What changed
Proof
Tested end-to-end with a gateway that exposes 135+ models. Before: 4 models in the picker. After: all gateway models appear and are selectable. Fallback path works correctly with ANTHROPIC_BASE_URL unset.
Behavior