Skip to content

fix: make model configuration resilient - #181

Open
huyua9 wants to merge 1 commit into
BuilderIO:mainfrom
huyua9:fix/config-ui-model-fallback
Open

fix: make model configuration resilient#181
huyua9 wants to merge 1 commit into
BuilderIO:mainfrom
huyua9:fix/config-ui-model-fallback

Conversation

@huyua9

@huyua9 huyua9 commented Aug 30, 2026

Copy link
Copy Markdown

Problem

ai config ui currently fails before showing its menu when OPENAI_KEY is not configured. Selecting Model also assumes that every OpenAI-compatible endpoint exposes a usable /models response, so custom endpoints can leave the user with an empty selector or an exception.

What changed

  • Allow the configuration UI and ai config get to read config without requiring an API key.
  • Skip /models lookup when no key is configured and fall back to manual model-id entry.
  • Fall back to manual entry when /models fails or returns no usable model IDs.
  • Keep a Custom model entry available even when a model list is returned.
  • Filter unusable model records before rendering the selector.

Validation

  • npm run typecheck
  • npm run build
  • ./node_modules/.bin/jiti tests/config-model-fallback.test.ts
  • Prettier check
  • ESLint (with the repository's existing no-var-requires baseline error disabled for validation)
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants