Skip to content

feat: fetch CommandCode model catalog dynamically - #9

Open
wsuites wants to merge 1 commit into
dev2k6:mainfrom
wsuites:main
Open

wsuites wants to merge 1 commit into
dev2k6:mainfrom
wsuites:main

Conversation

@wsuites

@wsuites wsuites commented Sep 8, 2026

Copy link
Copy Markdown
  • /v1/models returns the live model catalog (68 models) fetched from the official CommandCode docs registry, refreshed every 6h, with the static list as fallback
  • MapModel now resolves against the catalog (exact ids, short names, punctuation-insensitive), keeping the static alias table as fallback
  • Adds catalog.go/catalog_test.go with unit tests; all tests pass
- Fetch the official model list from the CommandCode docs registry
  (https://commandcode.ai/docs/reference/cli/models) on startup and every 6h
- /v1/models now returns the live catalog (68 models) with the static
  list as fallback until the first fetch completes
- MapModel resolves against the catalog: exact ids, short names
  (kimi-k2.5 -> moonshotai/Kimi-K2.5) and punctuation-insensitive
  matches (gemini38flash -> google/gemini-3.8-flash)
- Static alias table kept as fallback; add unit tests for parsing,
  resolution and fallback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant