Skip to content

fix(agent): clarify auxiliary OAuth provider credential errors - #56863

Closed
rasitakyol wants to merge 1 commit into
NousResearch:mainfrom
rasitakyol:fix/auxiliary-oauth-provider-error-message
Closed

fix(agent): clarify auxiliary OAuth provider credential errors#56863
rasitakyol wants to merge 1 commit into
NousResearch:mainfrom
rasitakyol:fix/auxiliary-oauth-provider-error-message

Conversation

@rasitakyol

Copy link
Copy Markdown
Contributor

Summary

  • Add credential-type-aware errors when explicit auxiliary provider client creation returns no client.
  • Mention Vertex ADC/OAuth/service-account setup and google-auth instead of suggesting a fake VERTEX_API_KEY.
  • Preserve existing API-key provider guidance for API-key-backed providers.

Fixes #56810

Tests

  • scripts/run_tests.sh tests/agent/test_auxiliary_client.py -k 'test_vertex_unavailable_mentions_adc_oauth_not_fake_api_key' -v --tb=short (RED before fix: failed on VERTEX_API_KEY)
  • scripts/run_tests.sh tests/agent/test_auxiliary_client.py -k 'TestExplicitProviderUnavailableMessages' -v --tb=short (2 passed)
  • scripts/run_tests.sh tests/agent/test_auxiliary_client.py -v --tb=short (283 passed)
  • git diff --check

@alt-glitch alt-glitch added type/bug Something isn't working comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P2 Medium — degraded but workaround exists duplicate This issue or pull request already exists labels Jul 2, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of #56842 (earliest of the three competing fixes for #56810). This PR and #56842 use the same mechanism at the same two raise sites: a helper that keys off the provider's auth_type in PROVIDER_REGISTRY and replaces the hardcoded <X>_API_KEY RuntimeError with an auth-mechanism-aware message. #56843 is the other duplicate of #56842. Maintainer picks one; #56842 is canonical as the earliest.

@rasitakyol

Copy link
Copy Markdown
Contributor Author

Thanks for the triage — closing this in favor of #56842.

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

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint duplicate This issue or pull request already exists P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misleading "API key was found" RuntimeError for non-API-key OAuth/ADC providers in auxiliary tasks

2 participants