@@ -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
@@ -259,7 +259,7 @@ export function buildOpenAISource(fields: {
259259 baseURL : isOllamaProviderId ( fields . id )
260260 ? ollamaOpenAIBaseURL ( fields . baseURL )
261261 : normalizeOpenAICompatibleBaseURL ( fields . baseURL ) ,
262- apiKey :
262+ credentialId :
263263 fields . apiKey !== undefined && fields . apiKey . length > 0
264264 ? fields . apiKey
265265 : KEYLESS_API_KEY ,
@@ -338,7 +338,7 @@ export function buildCodexSource(fields: {
338338 id : fields . id ,
339339 provider : CODEX_RESPONSES_PROVIDER ,
340340 baseURL : CODEX_BASE_URL ,
341- apiKey : fields . apiKey ,
341+ credentialId : fields . apiKey ,
342342 model : fields . model ,
343343 defaults : { maxTokens : SOURCE_MAX_TOKENS , providerOptions } ,
344344 } ;
@@ -368,7 +368,7 @@ export function buildXaiSource(fields: {
368368 id : fields . id ,
369369 provider : GROK_RESPONSES_PROVIDER ,
370370 baseURL : XAI_BASE_URL ,
371- apiKey : fields . apiKey ,
371+ credentialId : fields . apiKey ,
372372 model : fields . model ,
373373 defaults : { maxTokens : SOURCE_MAX_TOKENS , providerOptions } ,
374374 } ;
@@ -392,7 +392,7 @@ export function buildBifrostSource(fields: {
392392 id : fields . id ,
393393 provider : BIFROST_PROVIDER ,
394394 baseURL : normalizeOpenAICompatibleBaseURL ( fields . baseURL ) ,
395- apiKey :
395+ credentialId :
396396 fields . apiKey !== undefined && fields . apiKey . length > 0
397397 ? fields . apiKey
398398 : KEYLESS_API_KEY ,
@@ -412,7 +412,7 @@ export function buildAnthropicSource(fields: {
412412 id : fields . id ,
413413 provider : "anthropic" ,
414414 baseURL : fields . baseURL . replace ( / \/ + $ / , "" ) ,
415- apiKey :
415+ credentialId :
416416 fields . apiKey !== undefined && fields . apiKey . length > 0
417417 ? fields . apiKey
418418 : KEYLESS_API_KEY ,
@@ -440,7 +440,7 @@ export function buildGoSource(fields: {
440440 id : fields . id ,
441441 provider : OPENCODE_GO_MESSAGES_PROVIDER ,
442442 baseURL : endpoint . baseURL ,
443- apiKey,
443+ credentialId : apiKey ,
444444 model : fields . model ,
445445 defaults : {
446446 maxTokens : SOURCE_MAX_TOKENS ,
@@ -455,7 +455,7 @@ export function buildGoSource(fields: {
455455 id : fields . id ,
456456 provider : OPENAI_RESPONSES_PROVIDER ,
457457 baseURL : endpoint . baseURL ,
458- apiKey,
458+ credentialId : apiKey ,
459459 model : fields . model ,
460460 defaults : {
461461 maxTokens : SOURCE_MAX_TOKENS ,
@@ -509,7 +509,7 @@ export function buildZenSource(fields: {
509509 id : fields . id ,
510510 provider : ZEN_MESSAGES_PROVIDER ,
511511 baseURL : endpoint . baseURL ,
512- apiKey,
512+ credentialId : apiKey ,
513513 model : fields . model ,
514514 defaults : {
515515 maxTokens : SOURCE_MAX_TOKENS ,
@@ -524,7 +524,7 @@ export function buildZenSource(fields: {
524524 id : fields . id ,
525525 provider : OPENAI_RESPONSES_PROVIDER ,
526526 baseURL : endpoint . baseURL ,
527- apiKey,
527+ credentialId : apiKey ,
528528 model : fields . model ,
529529 defaults : {
530530 maxTokens : SOURCE_MAX_TOKENS ,
0 commit comments