Fetch dynamic provider model lists across LLM proxy, desktop, GPUI, and mobile
Summary
Context: Anarlog Pro and BYOK provider model selectors across apps/desktop, apps/desktop-gpui, apps/mobile, and crates/llm-proxy relied heavily on hardcoded model lists for Anarlog Pro, Vertex AI, Cloudflare Workers AI, and several remote STT providers, requiring app releases whenever upstream providers added or retired models.
Intention: Fetch live model lists dynamically from upstream provider endpoints and GET /llm/models while preserving curated fallbacks, request timeouts, response size limits, and capability filtering.
Direction:
- Expose
GET /llm/modelsoncrates/llm-proxy(returning the configured Anarlog ProModelEntrycatalog with curated labels/modalities) and regenerateapps/api/openapi.gen.jsonand@anlg/api-client. - Wire live discovery for Anarlog Pro (
/llm/models), Google Vertex AI (/publishers/google/models), Cloudflare Workers AI (/models/search), and listable remote STT providers acrossapps/desktop,apps/desktop-gpui, andapps/mobile, merging discovered models with curated fallback entries without blocking readiness.
Demo
N/A: backend endpoint, OpenAPI schema, and non-blocking async model discovery verified via unit tests and wiremock/node/Vitest harnesses.
Verification
Local checks run in /Users/johnjeong/.t3/worktrees/anarlog/fix-db-cd-remote-push-e0214c7b6dfa13dc (mise Node v22.23.4, Rust 1.98.1):
pnpm exec dprint check --allow-no-filesacross all changed files: passed.python3 .github/scripts/test_check_license_boundary.py && python3 .github/scripts/check_license_boundary.py: passed (9tests + license boundary passed).RUSTUP_TOOLCHAIN=1.98.1 cargo check --locked -p api: passed.RUSTUP_TOOLCHAIN=1.98.1 cargo test --locked -p llm-proxy: passed (7lib +4replay;2ignored E2E).pnpm -F @anlg/desktop typecheck && pnpm -F @anlg/mobile typecheck: passed.pnpm -F @anlg/desktop exec vitest run src/settings/ai/shared/anarlog-pro-models.test.ts src/settings/ai/shared/list-cloudflare-workers-ai.test.ts src/settings/ai/shared/list-google-vertex-ai.test.ts src/settings/ai/stt/list-models.test.ts src/settings/ai/stt/select.test.tsx: passed (5files,18tests); prior fullvitest run(505files) also passed. Pre-existing@tanstack/query/exhaustive-depsESLint error inapps/desktop/src/settings/ai/llm/select.tsx:228is unchanged frommain.pnpm exec oxlint --quiet --format=github apps/desktop/src/: passed (0errors,226warnings).node --test apps/mobile/src/settings/settings-runtime.test.mjs: passed (76/76tests).apps/desktop-gpui:cargo fmt --check,cargo test --locked --workspace(647lib +17a11y +dictation_capture+14screens), andcargo clippy --locked --workspace --all-targets --no-deps -- -D warnings: passed.
Summary by cubic
Replaces hardcoded provider model lists with live model discovery so model pickers in the desktop, GPUI, and mobile apps pick up new and retired upstream models without needing app releases.
Model selectors now fetch models from upstream provider endpoints and the LLM proxy, merging results with curated fallback lists without blocking readiness. Discovery requests carry timeouts and response size limits, and non-chat models are filtered out. OpenAI transcription mode was narrowed so only gpt-live-transcribe counts as live.
New Features
- Adds authenticated, rate-limited
GET /llm/modelstocrates/llm-proxyand regenerates the OpenAPI schema and@anlg/api-client. - Fetches live models for Anarlog Pro, Google Vertex AI, Cloudflare Workers AI, and listable remote STT providers across
apps/desktop,apps/desktop-gpui, andapps/mobile.