(model: BaseModel)
| 87 | }); |
| 88 | |
| 89 | export const modelInfo = (model: BaseModel): FrontendModelInfo => { |
| 90 | const modelWithProvider = (model.provider + ":" + model.baseModel) as ProviderWithModel; |
| 91 | const info = supportedModels[modelWithProvider]; |
| 92 | if (!info) { |
| 93 | throw new Error("Unknown model: " + JSON.stringify(model)); |
| 94 | } |
| 95 | return info; |
| 96 | }; |
| 97 | |
| 98 | export const calculateCost = ( |
| 99 | model: BaseModel, |
no outgoing calls
no test coverage detected