feat: add duo-chat-opus-4-6 model definition to models-api.json a…#12591
feat: add duo-chat-opus-4-6 model definition to models-api.json a…#12591yxshee wants to merge 2 commits intoanomalyco:devfrom
duo-chat-opus-4-6 model definition to models-api.json a…#12591Conversation
…nd update `gitlab-duo.test.ts` to assert its presence.
|
The following comment was made by an LLM, it may be inaccurate: No duplicate PRs found |
There was a problem hiding this comment.
Pull request overview
Adds duo-chat-opus-4-6 to the GitLab Duo models test fixture and updates the GitLab Duo provider test to assert the model appears in the available models list.
Changes:
- Added
duo-chat-opus-4-6model entry topackages/opencode/test/tool/fixtures/models-api.jsonunder thegitlabprovider. - Updated
packages/opencode/test/provider/gitlab-duo.test.tsto assert the new model ID is present in the provider’s models.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/opencode/test/tool/fixtures/models-api.json | Adds a GitLab Duo model definition for duo-chat-opus-4-6 in the test fixtures. |
| packages/opencode/test/provider/gitlab-duo.test.ts | Extends the GitLab Duo “multiple agentic chat models” test to include duo-chat-opus-4-6. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "duo-chat-opus-4-6": { | ||
| "id": "duo-chat-opus-4-6", | ||
| "name": "Agentic Chat (Claude Opus 4.6)", | ||
| "family": "claude-opus", | ||
| "attachment": true, | ||
| "reasoning": true, | ||
| "tool_call": true, | ||
| "temperature": true, | ||
| "knowledge": "2025-04-30", | ||
| "release_date": "2026-02-05", | ||
| "last_updated": "2026-02-05", | ||
| "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }, | ||
| "open_weights": false, | ||
| "cost": { "input": 0, "output": 0, "cache_read": 0, "cache_write": 0 }, | ||
| "limit": { "context": 200000, "output": 64000 } | ||
| }, |
There was a problem hiding this comment.
This update adds duo-chat-opus-4-6 only to a test fixture under packages/opencode/test/.... If the intent is to fix the runtime “Unknown model ID” error for end users, the model also needs to exist in the models source used at runtime (models.dev /api.json and/or the bundled models-snapshot generated during script/build.ts). Otherwise production builds will still be missing the model even though tests pass.
| expect(models).toContain("duo-chat-haiku-4-5") | ||
| expect(models).toContain("duo-chat-sonnet-4-5") | ||
| expect(models).toContain("duo-chat-opus-4-5") | ||
| expect(models).toContain("duo-chat-opus-4-6") |
There was a problem hiding this comment.
This test asserts that duo-chat-opus-4-6 is present in the provider’s model list, but it doesn’t exercise the code path that raised the reported error (“Unknown model ID … must be registered in MODEL_MAPPINGS”), which typically happens when instantiating/using the model via the GitLab SDK. Consider extending the test to construct/use the model (or otherwise validate getModel doesn’t throw for this ID) so the regression is actually covered.
yxshee
left a comment
There was a problem hiding this comment.
Changed output token to correct value in code : 128000
|
This is not needed. Opus 4.6 included in this PR: #12496 |
Summary
Fixes #12564
Adds the missing
duo-chat-opus-4-6model to the GitLab Duo provider, resolving the error:Changes
duo-chat-opus-4-6model definition to test fixturesModel Specification
duo-chat-opus-4-6Testing
Checklist