Skip to content

fix(proxy): route VS Code through selected profile model - #555

Merged
vadimvlasenko merged 1 commit into
codemie-ai:mainfrom
nadavsinai-philips:users/nadav/fix-vscode-profile-model-routing
Sep 18, 2026
Merged

vadimvlasenko merged 1 commit into
codemie-ai:mainfrom
nadavsinai-philips:users/nadav/fix-vscode-profile-model-routing

Conversation

@nadavsinai-philips

Copy link
Copy Markdown
Contributor

Makes proxy connect --vscode and --vscode-insiders register the active profile's model ID when it maps to a supported VS Code capability template. This prevents a provider-qualified CodeMie ID such as openai.gpt-5.6-sol from being overwritten with the incompatible dated catalog ID. Retains the static catalog fallback for profile-less or unrecognized models. Also makes Node types explicit for stable typecheck. Validated by the required hook: lint, 319 focused proxy tests, typecheck, and secret scan.

@8nevil8

8nevil8 commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

@nadavsinai-philips , could you pls fix CI and we'll proceed with review?

@8nevil8

8nevil8 commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

@nadavsinai-philips could you pls rebase? we'll proceed with merge after that

@nadavsinai-philips
nadavsinai-philips force-pushed the users/nadav/fix-vscode-profile-model-routing branch from d65947a to dbf51b3 Compare September 18, 2026 13:29
@vadimvlasenko
vadimvlasenko merged commit 3c966c1 into codemie-ai:main Sep 18, 2026
5 checks passed
vadimvlasenko added a commit that referenced this pull request Sep 22, 2026
Reconciles with PR #555 (main), which independently fixed VS Code
Copilot BYOK to register a profile-pinned model's real gateway id
instead of the static catalog's dated one. That fix predates this
branch's full rework of the same connector (tenant-catalog capability
table replacing the static list entirely), so it conflicted on
buildManagedModels/mergeManagedProviders/writeVsCodeLanguageModelsConfig
signatures.

Resolution: resolveManagedModels(proxyUrl, gatewayKey, profileModel)
now does both jobs with one mechanism — resolve every capability-table
family against the live tenant catalog as before, then, when a
profileModel is set and resolves against that same catalog, narrow the
result to just that one entry. This subsumes #555's "wrong id" fix
(every entry already carries the tenant's real id) while preserving
its "show just the pinned model" behavior, using the general resolver
instead of #555's static-list-only prefix/date-suffix heuristic.

.gitignore: took main's shape-based `**/*.local.*` rule over this
branch's narrower filename-list fix — strictly more general, no
Philips scrub involved.

Added profileModel-pinning test coverage in vscode.test.ts (new
interaction, not covered by either side). Verified: typecheck, full
unit (4184) + cli (279) suites, lint, build, license-check all clean —
matches this repo's actual CI gate (`npm run ci`) exactly.

--no-verify: the pre-commit hook additionally ran the `agent` vitest
project (triggered because tests/integration/agent-*.test.ts came in
staged from main's own unrelated PR #565/#568) and timed out on two
PTY-driven tests (agent-assistant.test.ts, agent-skills.test.ts)
waiting on a live Claude Code CLI trust-dialog prompt. Reproduced
standalone, unrelated to this merge's changes, pre-existing on main,
and not part of the `agent` project being outside `npm run ci`'s
scope. Skipped only after confirming with the user.

Generated with AI

Co-Authored-By: codemie-ai <[email protected]>
vadimvlasenko added a commit that referenced this pull request Sep 22, 2026
Reconciles with PR #555 (main), which independently fixed VS Code
Copilot BYOK to register a profile-pinned model's real gateway id
instead of the static catalog's dated one. That fix predates this
branch's full rework of the same connector (tenant-catalog capability
table replacing the static list entirely), so it conflicted on
buildManagedModels/mergeManagedProviders/writeVsCodeLanguageModelsConfig
signatures.

Resolution: resolveManagedModels(proxyUrl, gatewayKey, profileModel)
now does both jobs with one mechanism — resolve every capability-table
family against the live tenant catalog as before, then, when a
profileModel is set and resolves against that same catalog, narrow the
result to just that one entry. This subsumes #555's "wrong id" fix
(every entry already carries the tenant's real id) while preserving
its "show just the pinned model" behavior, using the general resolver
instead of #555's static-list-only prefix/date-suffix heuristic.

.gitignore: took main's shape-based `**/*.local.*` rule over this
branch's narrower filename-list fix — strictly more general, no
Philips scrub involved.

Added profileModel-pinning test coverage in vscode.test.ts (new
interaction, not covered by either side). Verified: typecheck, full
unit (4184) + cli (279) suites, lint, build, license-check all clean —
matches this repo's actual CI gate (`npm run ci`) exactly.

--no-verify: the pre-commit hook additionally ran the `agent` vitest
project (triggered because tests/integration/agent-*.test.ts came in
staged from main's own unrelated PR #565/#568) and timed out on two
PTY-driven tests (agent-assistant.test.ts, agent-skills.test.ts)
waiting on a live Claude Code CLI trust-dialog prompt. Reproduced
standalone, unrelated to this merge's changes, pre-existing on main,
and not part of the `agent` project being outside `npm run ci`'s
scope. Skipped only after confirming with the user.

Generated with AI

Co-Authored-By: codemie-ai <[email protected]>
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.

3 participants