Skip to content

fix(vscode-lm): complete Copilot model port with safe input ceilings - #2052

Merged
edelauna merged 1 commit into
Zoo-Code-Org:mainfrom
simurg79:port/vscode-lm-copilot-models-pr13-pr14
Oct 15, 2026
Merged

edelauna merged 1 commit into
Zoo-Code-Org:mainfrom
simurg79:port/vscode-lm-copilot-models-pr13-pr14

Conversation

@simurg79

@simurg79 simurg79 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Cap Claude Opus 5 and Gemini 3.6 Flash input tokens at 197897. Keep their advertised context windows at 935793.
  • Treat this cap as a conservative fallback, not a measurement of either model's actual ceiling.
  • Verify all six model records and check that the UI uses the input ceiling rather than the advertised window.
  • Change only the catalog and two focused test files. No version bump, changelog, changeset, or unrelated streaming commits.

Validation

Run in the isolated publication worktree based on Zoo-Code-Org/Zoo-Code main at 58341d882e57e9dd7eb50c5187a52917541789eb:

  • pnpm --dir packages/types exec vitest run src/__tests__/vscode-llm.spec.ts: 15 passed.
  • pnpm --dir webview-ui exec vitest run src/components/ui/hooks/__tests__/useSelectedModel.spec.ts: 110 passed.
  • pnpm --dir packages/types check-types: passed.
  • Scoped ESLint with --prune-suppressions --max-warnings=0: passed for all three files, with no suppressions added.
  • Prettier checks and git diff --check: passed.

A fresh frozen-lockfile install failed because the configured package feed returned HTTP 404 for a locked package. Validation reused installed dependencies with workspace package links directed to the publication worktree. Vitest reported 4.1.9 rather than the declared 4.1.11. The installed Node 24 also differs from the requested Node 22.23.1. The full suite and live Copilot probes were not run.

Related issue and scope

No approved Zoo Code issue was supplied or identified for this exact port. Both source PRs and the prior merged port are linked above. This PR does not claim to close an issue.

This supports provider reliability. No separate documentation or visual snapshots are needed for this catalog correction. Implementation, publication, and verification were AI-assisted.

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: Zoo-Code-Org/Zoo-Code/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 218dfc13-3ff3-4acb-b633-7167809d9b31
📥 Commits

Reviewing files that changed from the base of the PR and between 58341d8 and e9abe2f.

📒 Files selected for processing: 3
  • packages/types/src/__tests__/vscode-llm.spec.ts
  • packages/types/src/providers/vscode-llm.ts
  • webview-ui/src/components/ui/hooks/__tests__/useSelectedModel.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

📜 Recent review details
🧰 Additional context used
📓 Path-based instructions: 5
For persisted settings, verify the complete schema/storage/runtime/webview round trip, shared default semantics, and focused true plus false/unset tests.

⚙️ CodeRabbit configuration file

Files:

  • packages/types/src/providers/vscode-llm.ts
  • packages/types/src/__tests__/vscode-llm.spec.ts
Require regression coverage at the lowest valid harness with behavior-focused assertions, including relevant negative, error, false/unset, and boundary cases.

⚙️ CodeRabbit configuration file

Files:

  • webview-ui/src/components/ui/hooks/__tests__/useSelectedModel.spec.ts
  • packages/types/src/__tests__/vscode-llm.spec.ts
Check strict typing and exhaustive behavior across normal, boundary, error, cancellation, retry, and compatibility paths.

⚙️ CodeRabbit configuration file

Files:

  • packages/types/src/providers/vscode-llm.ts
  • webview-ui/src/components/ui/hooks/__tests__/useSelectedModel.spec.ts
  • packages/types/src/__tests__/vscode-llm.spec.ts
Check React state and effect dependencies, cleanup, accessibility, i18n, and light/dark theme behavior.

⚙️ CodeRabbit configuration file

Files:

  • webview-ui/src/components/ui/hooks/__tests__/useSelectedModel.spec.ts
Act as an adversarial second-opinion reviewer.

⚙️ CodeRabbit configuration file

Files:

  • packages/types/src/providers/vscode-llm.ts
  • webview-ui/src/components/ui/hooks/__tests__/useSelectedModel.spec.ts
  • packages/types/src/__tests__/vscode-llm.spec.ts
🔇 Additional comments: 3
packages/types/src/providers/vscode-llm.ts: 1

17-21: LGTM!

Also applies to: 33-33, 249-249

packages/types/src/__tests__/vscode-llm.spec.ts: 1

19-25: LGTM!

Also applies to: 27-27, 36-36

webview-ui/src/components/ui/hooks/__tests__/useSelectedModel.spec.ts: 1

1425-1431: LGTM!

Also applies to: 1433-1434, 1436-1443

📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Updated the usable input limits for Claude Opus 5 and Gemini 3.6 Flash to 197,897 tokens. Their advertised context windows remain unchanged, helping ensure the app uses a more conservative limit when handling input.
  • Tests
    • Added coverage to verify that selected models use their usable input limits rather than their advertised context windows.

Claude Opus 5 and Gemini 3.6 Flash now have maxInputTokens values of 197897, while their advertised contextWindow values remain unchanged. Tests now check explicit model limits and selected-model behavior across three model families.

Changes: VS Code model input limits

Layer / File(s) Summary
Input limits and validation
packages/types/src/providers/vscode-llm.ts, packages/types/src/__tests__/vscode-llm.spec.ts, webview-ui/src/components/ui/hooks/__tests__/useSelectedModel.spec.ts
Claude Opus 5 and Gemini 3.6 Flash use maxInputTokens of 197897 while retaining contextWindow values of 935793. Tests assert explicit per-model limits and check selected-model behavior for three families.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to e9abe

The change applies the stated input ceilings while retaining advertised context windows. No concrete merge-blocking behavior is established by the supplied evidence.

Pre-merge checks: Passed 7 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description explains the implementation and validation, but it does not follow the required template. It provides no approved GitHub issue, omits the required pre-submission checklist, and omits s… Link an approved GitHub issue and use the repository template. Add the required pre-submission checklist and complete the documentation, visual snapshots, videos, additional notes, and contact sections as applicable.
Passed Passed checks: 7 passed
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Regression Evidence Passed The changed behavior has focused coverage. The catalog test asserts exact contextWindow and maxInputTokens values for all six model rows, including the two changed rows. The hook test exercises `c…
Security Boundaries Passed PASS. The changed runtime path only updates static maxInputTokens values and comments in packages/types/src/providers/vscode-llm.ts. The two other changed files contain tests only. The catalog con…
Persistence Integrity Passed No changed persistence path exists. The pull request changes only the VS Code LM catalog comments and two tests; the catalog edits are in-memory model metadata and contain no writes, async operations,…
Lifecycle Resource Cleanup Passed PASS. The pull request changes only VS Code LM catalog values, comments, and focused assertions. The catalog changes are static maxInputTokens values for Claude Opus 5 and Gemini 3.6 Flash. No chang…
Title check Passed The title clearly describes the main change: completing the Copilot model port with safe input ceilings.
Full details: Description check

Explanation

The description explains the implementation and validation, but it does not follow the required template. It provides no approved GitHub issue, omits the required pre-submission checklist, and omits several required sections.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Review status

Thanks for contributing. This comment tracks the review sequence and the next action.

Current step: Awaiting fresh human maintainer or CODEOWNER approval.

Automated review is complete for the latest commit but does not replace human approval.

Review-state labels are managed by this workflow; do not edit them manually. community-approved is managed the same way — do not add or remove it manually. It signals a fresh community code approval for the current head as an advisory priority only; maintainer review is still required.

@github-actions github-actions Bot added coderabbit-review-active Required CI passed; CodeRabbit review is active awaiting-coderabbit Waiting for CodeRabbit to approve the latest commit labels Oct 14, 2026
@codecov

codecov Bot commented Oct 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions github-actions Bot added awaiting-maintainer CodeRabbit approved; waiting for a human maintainer and removed coderabbit-review-active Required CI passed; CodeRabbit review is active awaiting-coderabbit Waiting for CodeRabbit to approve the latest commit labels Oct 14, 2026
@edelauna
edelauna added this pull request to the merge queue Oct 15, 2026
Merged via the queue into Zoo-Code-Org:main with commit 530d01e Oct 15, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-maintainer CodeRabbit approved; waiting for a human maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants