MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / getOpenCodeZenModelId

Function getOpenCodeZenModelId

web/src/llm-api/opencode-zen.ts:72–83  ·  view source on GitHub ↗
(model: string)

Source from the content-addressed store, hash-verified

70}
71
72function getOpenCodeZenModelId(model: string): string {
73 const opencodeId = OPENCODE_ZEN_MODEL_ALIASES[model]
74 if (opencodeId) return opencodeId
75
76 throw new OpenCodeZenError(400, 'Bad Request', {
77 error: {
78 message: `Unsupported OpenCode Zen model: ${model}. Supported models: ${SUPPORTED_OPENCODE_ZEN_MODELS.join(', ')}`,
79 code: 'unsupported_model',
80 type: 'invalid_request_error',
81 },
82 })
83}
84
85function getOpenCodeZenPricing(model: string): OpenCodeZenPricing {
86 return OPENCODE_ZEN_PRICING[getOpenCodeZenModelId(model)] ?? KIMI_ZEN_PRICING

Callers 2

getOpenCodeZenPricingFunction · 0.85
createOpenCodeZenRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected