fix(digitalocean): use OAuth token directly for inference instead of creating MAK#28897
Open
Spherrrical wants to merge 6 commits into
Open
fix(digitalocean): use OAuth token directly for inference instead of creating MAK#28897Spherrrical wants to merge 6 commits into
Spherrrical wants to merge 6 commits into
Conversation
…creating MAK The /v2/gen-ai/models/api_keys endpoint is retired and returns 410. OAuth token is now stored as the API key directly for inference calls. Scopes updated to genai:read and inference:query (minimum required).
Contributor
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Collaborator
|
/review |
|
|
||
| await new Promise<void>((resolve, reject) => { | ||
| oauthServer!.listen(OAUTH_PORT, () => { | ||
| oauthServer!.listen(OAUTH_PORT, "127.0.0.1", () => { |
Contributor
There was a problem hiding this comment.
Suggestion (human choice): binding only to 127.0.0.1 can make the OAuth callback fail on systems where localhost resolves to IPv6 (::1) first, because the authorize URL still uses http://localhost:1456/.... Either make the redirect URI use 127.0.0.1 too, or keep the listener hostless so it accepts the localhost resolution.
Suggested change
| oauthServer!.listen(OAUTH_PORT, "127.0.0.1", () => { | |
| oauthServer!.listen(OAUTH_PORT, () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #28899
Type of change
What does this PR do?
DigitalOcean retired the
/v2/gen-ai/models/api_keysendpoint (returns 410). The OAuth flow was calling it to create a Model Access Key after sign-in, so authentication always failed for new users.The fix: store the OAuth access token directly as the API key instead. DigitalOcean now uses unified API tokens — the OAuth token works for inference calls without needing a separate MAK. OAuth scopes updated to
genai:read inference:query(minimum required for router listing and inference).How did you verify your code works?
Ran
/connect→ DigitalOcean OAuth end-to-end. Token is stored correctly, Inference Routers are discovered, and inference calls succeed.Screenshots / recordings
No UI changes.
Checklist