Dashboard › opencode › Distillation
6e43ebb2-6121-4ab8-b141-5038648d1632["lore_tm_v1_q8OZ9ke0f4_Xgy8_CsewS8V-culEK9vS_EzAA0q6IdY"]
Date: September 9, 2026
/home/byk/Code/opencode-v2-pilot/packages/ai/src/providers/anthropic-compatible.ts:34-35 defines auth resolution: returns input.auth when present and truthy; otherwise uses Auth.optional("apiKey" in input ? input.apiKey : undefined, "apiKey").pipe(Auth.header("x-api-key"))./home/byk/Code/opencode-v2-pilot/packages/ai/src/providers/anthropic-compatible.ts:38-52 defines configure(input: Config): defaults provider to "anthropic-compatible", excludes provider, baseURL, apiKey, and auth from rest, creates AnthropicMessages.route.with({ ...rest, provider, endpoint: { baseURL }, auth: auth(input) }), and returns id: ProviderID.make(provider), a typed model() factory, and configure./home/byk/Code/opencode-v2-pilot/packages/ai/src/providers/anthropic-compatible.ts:55-58 exports provider with { id, configure }./home/byk/Code/opencode-v2-pilot/packages/ai/src/providers/anthropic-compatible.ts:60-71 defines the package model adapter. It throws Error("Anthropic-compatible apiKey cannot be combined with authToken") if both settings.apiKey and settings.authToken are defined; otherwise it passes either { apiKey: settings.apiKey } or { auth: Auth.bearer(settings.authToken) } to configure, clones settings.headers, maps settings.body to http: { body: { ...settings.body } }, and forwards settings.provider.