You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9819eb6
Browse filesBrowse the repository at this point in the historyBrowse files
"Bailian credentials come from bl's auth chain: --api-key > DASHSCOPE_API_KEY > `bl auth login` (active config profile).",
53
53
"Other providers read the env vars referenced in agents.yaml (e.g. ${ANTHROPIC_API_KEY}), including .env and ~/.agents/config.json.",
54
-
"Only the providers this run involves (--provider, or the config's default provider chain) need credentials; other configured providers are not checked.",
55
54
"Resolved credentials are injected into the SDK in-memory and cleared from the environment; they never persist in process env.",
56
55
];
57
56
@@ -89,10 +88,10 @@ export function prepareProviderEnv(): void {
89
88
* `base_url` carries {@link AGENTSTUDIO_API_PATH} because the SDK appends resource
90
89
* paths onto it verbatim; a value already ending in the suffix is left as-is.
91
90
* It is filled even without a credential — `client.baseUrl` is readable
92
-
* credential-less (defaults to the CLI's model-domain base URL) — so offline /
93
-
* out-of-scope runs still satisfy the SDK's "workspace_id or base_url" schema.
94
-
* With no credential the `api_key` is left untouched: an in-scope empty key is
95
-
* rejected by {@link assertProviderCredentials}, out-of-scope ones may stay empty.
91
+
* credential-less (defaults to the CLI's model-domain base URL) — so offline
92
+
* commands (which skip the credential assert) still satisfy the SDK's
93
+
* "workspace_id or base_url" schema. With no credential the `api_key` is left
94
+
* untouched: online commands reject it via {@link assertProviderCredentials}.
96
95
*/
97
96
exportfunctioninjectProviderCredentials(
98
97
providers: Record<string,unknown>,
@@ -133,10 +132,11 @@ export function scrubCredentialEnv(): void {
133
132
/**
134
133
* The SDK interpolates `${VAR}` into the raw YAML text, so an empty env var
135
134
* leaves `api_key:` with nothing after it — YAML parses that as null. Normalize
136
-
* every null provider field back to "" so the pipeline stays uniform: an empty
137
-
* api_key is caught by {@link assertProviderCredentials} when the provider is
138
-
* in scope, and out-of-scope blocks still satisfy the SDK's string schemas
139
-
* instead of failing zod with "received null" before the run even starts.
135
+
* every null provider field back to "" so the pipeline stays uniform: for
136
+
* online commands an empty api_key is caught by {@link
137
+
* assertProviderCredentials}; for offline commands (which skip the assert) the
138
+
* blocks still satisfy the SDK's string schemas instead of failing zod with
0 commit comments