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

@@ -262,6 +262,7 @@ export namespace Session {
if (msgs.length === 0 && !session.parentID) {
generateText({
maxTokens: input.providerID === "google" ? 1024 : 20,
providerOptions: model.info.options,
messages: [
...SystemPrompt.title(input.providerID).map(
(x): CoreMessage => ({
@@ -507,6 +508,7 @@ export namespace Session {
toolCallStreaming: true,
abortSignal: abort.signal,
maxSteps: 1000,
providerOptions: model.info.options,
messages: [
...system.map(
(x): CoreMessage => ({
@@ -521,9 +523,7 @@ export namespace Session {
ProviderTransform.message(msg, i, input.providerID, input.modelID),
),
temperature: model.info.temperature ? 0 : undefined,
tools: {
...tools,
},
tools: model.info.tool_call === false ? undefined : tools,
model: model.language,
})
try {