Skip to content

fix(provider): pass Gitlab token to authorize and use token for model discovery - #37104

Closed
thomwiggers wants to merge 1 commit into
anomalyco:devfrom
thomwiggers:fix/gitlab-duo-auth-and-workflow-discovery
Closed

thomwiggers wants to merge 1 commit into
anomalyco:devfrom
thomwiggers:fix/gitlab-duo-auth-and-workflow-discovery

Conversation

@thomwiggers

@thomwiggers thomwiggers commented Jul 15, 2026 •

Copy link
Copy Markdown

Forward the entered apiKey as token in authorizeApi inputs, and gate model discovery on the resolved token rather than apiKey so OAuth (GitLab Duo) flows discover models correctly.

Issue for this PR

Closes #37107

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

  1. Gitlab Duo agent platform (duo-workflow-) models are dependent on the specific namespace that's loaded and discovery of models thus requires you to be logged in correctly. This wires through the key correctly if it's provided as an environment variable
  2. Signing in to Gitlab Duo by passing a PAT in the user interface was just broken

How did you verify your code works?

I have run this code against a Gitlab Enterprise self-hosted server and used it to run OpenCode.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels Jul 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@thomwiggers thomwiggers changed the title fix(gitlab): pass token to authorize and use token for model discovery fix(provider): pass Gitlab token to authorize and use token for model discovery Jul 15, 2026
Forward the entered apiKey as `token` in authorizeApi inputs, and gate
model discovery on the resolved `token` rather than `apiKey` so OAuth
(GitLab Duo) flows discover models correctly.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_011nBvQs5zGuquuW8JvHPUUJ
@github-actions

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

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 provider does not discover duo-workflow (Agentic Platform) models

1 participant