Skip to content

feat(provider): auth-provider aliases — reuse another provider's auth flow#28489

Open
ziuus wants to merge 1 commit into
anomalyco:devfrom
ziuus:auth-provider-alias
Open

feat(provider): auth-provider aliases — reuse another provider's auth flow#28489
ziuus wants to merge 1 commit into
anomalyco:devfrom
ziuus:auth-provider-alias

Conversation

@ziuus
Copy link
Copy Markdown

@ziuus ziuus commented May 20, 2026

Issue for this PR

N/A - feature request

Type of change

  • New feature

What does this PR do?

Adds auth_provider to the config schema, allowing config providers to reuse another provider's authentication flow.

When a config provider has auth_provider: "github-copilot", the provider loader will:

  1. Look up the github-copilot plugin's auth loader
  2. Load credentials stored under the alias provider ID (e.g. custom-github-copilot)
  3. Fall back to the source provider's credentials if the alias has none stored

This enables scenarios like:

  • Running multiple model configurations under the same auth (same credentials, different model lists)
  • Using separate credentials for different model configurations but sharing the same auth flow (OAuth, device flow, etc.)

The feature is resolved purely at the provider loading layer - aliases without stored credentials naturally piggyback on the source provider's auth without any auth CLI changes.

How did you verify your code works?

  • Config parsing test: verifies auth_provider survives JSON serialize/deserialize roundtrip
  • Provider list test: verifies a provider with auth_provider appears in the resolved provider list
  • Manually reviewed the provider loading logic to confirm the alias loop correctly binds to the source plugin's auth loader and handles fallback

Screenshots / recordings

N/A - backend/provider logic change

Checklist

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

… flow

Config providers can now set auth_provider: <id> to reuse the OAuth or
credential flow from another provider while storing credentials under
their own provider ID.

This allows patterns like:
- custom-github-copilot with auth_provider: github-copilot
- Multiple config providers sharing the same auth plugin, each with
  their own credential store or falling back to the source provider's auth

Implementation: inside the plugin auth loader loop, after loading the
plugin's own auth, we iterate config providers with matching auth_provider
and run them through the same auth loader with alias credentials.

Tests: config parse test verifies auth_provider survives JSON roundtrip,
provider test verifies a custom provider with auth_provider appears in
the provider list.
@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels May 20, 2026
@github-actions
Copy link
Copy Markdown
Contributor

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

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