()
| 79 | } |
| 80 | |
| 81 | override getModel() { |
| 82 | const id = this.options.requestyModelId ?? requestyDefaultModelId |
| 83 | const cachedInfo = this.models[id] ?? requestyDefaultModelInfo |
| 84 | let info: ModelInfo = cachedInfo |
| 85 | |
| 86 | // Apply tool preferences for models accessed through routers (OpenAI, Gemini) |
| 87 | info = applyRouterToolPreferences(id, info) |
| 88 | |
| 89 | const params = getModelParams({ |
| 90 | format: "anthropic", |
| 91 | modelId: id, |
| 92 | model: info, |
| 93 | settings: this.options, |
| 94 | defaultTemperature: 0, |
| 95 | }) |
| 96 | const reasoning = getAnthropicProviderReasoning({ |
| 97 | model: info, |
| 98 | reasoningBudget: params.reasoningBudget, |
| 99 | settings: this.options, |
| 100 | }) |
| 101 | |
| 102 | return { id, info, ...params, reasoning } |
| 103 | } |
| 104 | |
| 105 | protected processUsageMetrics(usage: any, modelInfo?: ModelInfo): ApiStreamUsageChunk { |
| 106 | const requestyUsage = usage as RequestyUsage |
no test coverage detected