(model: string)
| 70 | } |
| 71 | |
| 72 | function 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 | |
| 85 | function getOpenCodeZenPricing(model: string): OpenCodeZenPricing { |
| 86 | return OPENCODE_ZEN_PRICING[getOpenCodeZenModelId(model)] ?? KIMI_ZEN_PRICING |
no outgoing calls
no test coverage detected