Skip to content

Conversation

@yxshee
Copy link
Contributor

@yxshee yxshee commented Feb 7, 2026

Summary

Fixes #12564

Adds the missing duo-chat-opus-4-6 model to the GitLab Duo provider, resolving the error:

GitLabError: Unknown model ID: duo-chat-opus-4-6. Model must be registered in MODEL_MAPPINGS

Changes

  • Added duo-chat-opus-4-6 model definition to test fixtures
  • Updated GitLab provider test to verify model availability

Model Specification

Property Value
ID duo-chat-opus-4-6
Name Agentic Chat (Claude Opus 4.6)
Family claude-opus
Context 200K tokens
Output 128K tokens
Capabilities attachments, reasoning, tool_call, temperature
Modalities text, image, pdf → text

Testing

  • JSON syntax validated
  • Model definition follows existing patterns

Checklist

  • Code follows project conventions
  • Changes are minimal and focused

…nd update `gitlab-duo.test.ts` to assert its presence.
Copilot AI review requested due to automatic review settings February 7, 2026 09:10
@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2026

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-6 model entry to packages/opencode/test/tool/fixtures/models-api.json under the gitlab provider.
  • Updated packages/opencode/test/provider/gitlab-duo.test.ts to 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.

Comment on lines 32973 to 32988
"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 }
},
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
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")
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

@yxshee yxshee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed output token to correct value in code : 128000

@vglafirov
Copy link
Contributor

This is not needed. Opus 4.6 included in this PR: #12496

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gitlab Duo Opus 4.6 model mappings missing

2 participants