Skip to content

Auto-detect OBO endpoints and forward user token#145

Open
dhruv0811 wants to merge 2 commits intomainfrom
obo-auto-detection
Open

Auto-detect OBO endpoints and forward user token#145
dhruv0811 wants to merge 2 commits intomainfrom
obo-auto-detection

Conversation

@dhruv0811
Copy link
Contributor

Summary

  • Detect OBO-enabled serving endpoints via auth_policy.user_auth_policy.api_scopes in the endpoint API response
  • Log a warning with required scopes for the user to configure
  • Expose OBO status via GET /api/config
  • Forward x-forwarded-access-token header to the serving endpoint

Test plan

  • Configure app with an OBO-enabled endpoint, verify warning logged at startup
  • Hit GET /api/config, verify obo.enabled: true and obo.requiredScopes populated
  • Send chat message, verify user identity is forwarded to endpoint
  • Existing tests pass with updated mock

🤖 Generated with Claude Code

dhruv0811 and others added 2 commits March 5, 2026 13:49
When the serving endpoint has auth_policy.user_auth_policy.api_scopes
(OBO-enabled), the chat template now:

1. Detects OBO via the serving-endpoints API response
2. Logs a warning with required scopes for the user to configure
3. Exposes OBO status via GET /api/config
4. Forwards x-forwarded-access-token header to the endpoint

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When the serving endpoint has OBO scopes (auth_policy.user_auth_policy),
display an amber badge in the chat header listing the required scopes
and linking to the auth docs. Also notes that UC function scopes are
not yet supported.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dhruv0811 dhruv0811 force-pushed the obo-auto-detection branch from eb21e57 to 0e82c5b Compare March 5, 2026 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant