Skip to content

feat(proxy): discover VS Code BYOK models dynamically - #470

Closed
romius wants to merge 1 commit into
codemie-ai:mainfrom
romius:feat/vscode-byok-dynamic-models
Closed

feat(proxy): discover VS Code BYOK models dynamically#470
romius wants to merge 1 commit into
codemie-ai:mainfrom
romius:feat/vscode-byok-dynamic-models

Conversation

@romius

@romius romius commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Replace the hardcoded VS Code BYOK model catalog with profile-aware model discovery through the authenticated local CodeMie proxy. VS Code now receives the enabled models for the selected profile/project while retaining safe compatibility defaults for protocol routing and model-specific parameters that are not yet supplied by the backend catalog.

Changes

  • Fetch, normalize, deduplicate, and deterministically order enabled models from /v1/llm_models?include_all=true.
  • Resolve each model to Chat Completions, Responses, or Anthropic Messages using backend protocol metadata first and compatibility rules second; models that cannot be classified are omitted instead of receiving an unsafe fallback.
  • Preserve the former static catalog behavior for reasoning efforts, token limits, zero-data-retention Responses mode, adaptive thinking, Anthropic bearer headers, and top_p: null.
  • Keep backend-provided limits and capabilities authoritative when present.
  • Update chatLanguageModels.json atomically while preserving unrelated providers, the CodeMie secret reference, and existing VS Code model settings.
  • Add unit, integration, and opt-in live model certification coverage.

Impact

Before this change, VS Code exposed a fixed model list that could drift from the models enabled for a CodeMie profile. Reconnecting VS Code now refreshes the catalog from the selected profile without overwriting unrelated configuration.

Verification

  • npm run typecheck — passed
  • npm run lint — passed
  • npm run build — passed
  • npm run test:all — 2,957 passed, 8 skipped
  • Live profile certification — 37 models discovered, 36 protocol-compatible, 130/130 model-effort combinations passed
  • Certification report: VS Code live model results

One enabled model, deepseek-r1, remains intentionally unclassified because neither backend protocol metadata nor a verified compatibility rule is available.

Checklist

  • Self-reviewed
  • Manual testing performed
  • Documentation updated (if needed)
  • No breaking changes (or clearly documented)

@romius
romius marked this pull request as ready for review August 6, 2026 14:47
@romius romius closed this Aug 6, 2026
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.

1 participant