@@ -107,7 +107,7 @@ export const SOURCE_MAX_TOKENS = 16384;
107107
108108// Placeholder sent in the Authorization header for keyless local providers
109109// (e.g. Ollama). The runtime's InferenceSource type requires a non-empty
110- // apiKey string; the value is injected as `Bearer <key>` by the harness but
110+ // credentialId string; the value is injected as `Bearer <key>` by the harness but
111111// keyless servers ignore it entirely.
112112export const KEYLESS_API_KEY = "keyless" ;
113113
@@ -229,7 +229,7 @@ export function buildOpenAISource(fields: {
229229 baseURL : isOllamaProviderId ( fields . id )
230230 ? ollamaOpenAIBaseURL ( fields . baseURL )
231231 : normalizeOpenAICompatibleBaseURL ( fields . baseURL ) ,
232- apiKey :
232+ credentialId :
233233 fields . apiKey !== undefined && fields . apiKey . length > 0
234234 ? fields . apiKey
235235 : KEYLESS_API_KEY ,
@@ -308,7 +308,7 @@ export function buildCodexSource(fields: {
308308 id : fields . id ,
309309 provider : CODEX_RESPONSES_PROVIDER ,
310310 baseURL : CODEX_BASE_URL ,
311- apiKey : fields . apiKey ,
311+ credentialId : fields . apiKey ,
312312 model : fields . model ,
313313 defaults : { maxTokens : SOURCE_MAX_TOKENS , providerOptions } ,
314314 } ;
@@ -338,7 +338,7 @@ export function buildXaiSource(fields: {
338338 id : fields . id ,
339339 provider : GROK_RESPONSES_PROVIDER ,
340340 baseURL : XAI_BASE_URL ,
341- apiKey : fields . apiKey ,
341+ credentialId : fields . apiKey ,
342342 model : fields . model ,
343343 defaults : { maxTokens : SOURCE_MAX_TOKENS , providerOptions } ,
344344 } ;
@@ -362,7 +362,7 @@ export function buildBifrostSource(fields: {
362362 id : fields . id ,
363363 provider : BIFROST_PROVIDER ,
364364 baseURL : normalizeOpenAICompatibleBaseURL ( fields . baseURL ) ,
365- apiKey :
365+ credentialId :
366366 fields . apiKey !== undefined && fields . apiKey . length > 0
367367 ? fields . apiKey
368368 : KEYLESS_API_KEY ,
@@ -382,7 +382,7 @@ export function buildAnthropicSource(fields: {
382382 id : fields . id ,
383383 provider : "anthropic" ,
384384 baseURL : fields . baseURL . replace ( / \/ + $ / , "" ) ,
385- apiKey :
385+ credentialId :
386386 fields . apiKey !== undefined && fields . apiKey . length > 0
387387 ? fields . apiKey
388388 : KEYLESS_API_KEY ,
@@ -410,7 +410,7 @@ export function buildGoSource(fields: {
410410 id : fields . id ,
411411 provider : OPENCODE_GO_MESSAGES_PROVIDER ,
412412 baseURL : endpoint . baseURL ,
413- apiKey,
413+ credentialId : apiKey ,
414414 model : fields . model ,
415415 defaults : {
416416 maxTokens : SOURCE_MAX_TOKENS ,
@@ -425,7 +425,7 @@ export function buildGoSource(fields: {
425425 id : fields . id ,
426426 provider : OPENAI_RESPONSES_PROVIDER ,
427427 baseURL : endpoint . baseURL ,
428- apiKey,
428+ credentialId : apiKey ,
429429 model : fields . model ,
430430 defaults : {
431431 maxTokens : SOURCE_MAX_TOKENS ,
@@ -479,7 +479,7 @@ export function buildZenSource(fields: {
479479 id : fields . id ,
480480 provider : ZEN_MESSAGES_PROVIDER ,
481481 baseURL : endpoint . baseURL ,
482- apiKey,
482+ credentialId : apiKey ,
483483 model : fields . model ,
484484 defaults : {
485485 maxTokens : SOURCE_MAX_TOKENS ,
@@ -494,7 +494,7 @@ export function buildZenSource(fields: {
494494 id : fields . id ,
495495 provider : OPENAI_RESPONSES_PROVIDER ,
496496 baseURL : endpoint . baseURL ,
497- apiKey,
497+ credentialId : apiKey ,
498498 model : fields . model ,
499499 defaults : {
500500 maxTokens : SOURCE_MAX_TOKENS ,
0 commit comments