feat: forward provider options from model config (#202)

Co-authored-by: Dax Raad <d@ironbay.co>
This commit is contained in:
Josh
2025-06-20 14:03:41 -05:00
committed by GitHub
parent 91c4da5dbd
commit 9991352663
3 changed files with 18 additions and 10 deletions

View File

@@ -161,13 +161,19 @@ export namespace Provider {
attachment: model.attachment ?? existing?.attachment ?? false,
reasoning: model.reasoning ?? existing?.reasoning ?? false,
temperature: model.temperature ?? existing?.temperature ?? false,
cost: model.cost ??
existing?.cost ?? {
input: 0,
output: 0,
inputCached: 0,
outputCached: 0,
},
tool_call: model.tool_call ?? existing?.tool_call ?? true,
cost: {
...existing?.cost,
...model.cost,
input: 0,
output: 0,
cache_read: 0,
cache_write: 0,
},
options: {
...existing?.options,
...model.options,
},
limit: model.limit ??
existing?.limit ?? {
context: 0,