|
|
@@ -272,14 +272,20 @@ export namespace Provider {
|
|
|
reasoning: model.reasoning ?? existing?.reasoning ?? false,
|
|
|
temperature: model.temperature ?? existing?.temperature ?? false,
|
|
|
tool_call: model.tool_call ?? existing?.tool_call ?? true,
|
|
|
- cost: {
|
|
|
- ...existing?.cost,
|
|
|
- ...model.cost,
|
|
|
- input: 0,
|
|
|
- output: 0,
|
|
|
- cache_read: 0,
|
|
|
- cache_write: 0,
|
|
|
- },
|
|
|
+ cost:
|
|
|
+ !model.cost && !existing?.cost
|
|
|
+ ? {
|
|
|
+ input: 0,
|
|
|
+ output: 0,
|
|
|
+ cache_read: 0,
|
|
|
+ cache_write: 0,
|
|
|
+ }
|
|
|
+ : {
|
|
|
+ cache_read: 0,
|
|
|
+ cache_write: 0,
|
|
|
+ ...existing?.cost,
|
|
|
+ ...model.cost,
|
|
|
+ },
|
|
|
options: {
|
|
|
...existing?.options,
|
|
|
...model.options,
|