Skip to content

Auto-detect OBO endpoints and forward user token#145

Open
dhruv0811 wants to merge 1 commit intomainfrom
obo-auto-detection
Open

Auto-detect OBO endpoints and forward user token#145
dhruv0811 wants to merge 1 commit 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

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>
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