xAI: reuse fallback auth for runtime and discovery

This commit is contained in:
huntharo
2026-03-27 17:39:44 -04:00
committed by Peter Steinberger
parent 800042a3d5
commit 9dd08a49a4
6 changed files with 285 additions and 15 deletions

View File

@@ -1132,6 +1132,15 @@ export type ProviderPlugin = {
/**
* Provider-owned synthetic auth marker.
*
* This hook is the canonical seam for provider-specific fallback auth
* derived from plugin/private config. It may return:
* - a runnable literal credential for runtime callers
* - a non-secret marker for managed-secret source config, which is still useful
* for discovery/bootstrap callers
*
* Runtime callers must not treat non-secret markers as runnable credentials;
* they should retry against the active runtime snapshot when available.
*
* Use this when the provider can operate without a real secret for certain
* configured local/self-hosted cases and wants auth resolution to treat that
* config as available.