mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-09-30 13:53:15 +00:00
fix: Make max tokens configurable, bump default to 10_000 (#64)
This commit is contained in:
parent
65b68a1a42
commit
7b307e9cc8
2 changed files with 19 additions and 1 deletions
|
|
@ -343,6 +343,24 @@ export const GraphConfiguration = z.object({
|
|||
"Maximum number of context gathering actions during planning",
|
||||
},
|
||||
}),
|
||||
/**
|
||||
* The maximum number of tokens to generate in an individual generation.
|
||||
* @default 10_000
|
||||
*/
|
||||
maxTokens: z
|
||||
.number()
|
||||
.optional()
|
||||
.default(() => 10_000)
|
||||
.langgraph.metadata({
|
||||
x_oap_ui_config: {
|
||||
type: "number",
|
||||
default: 10_000,
|
||||
min: 1,
|
||||
max: 64_000,
|
||||
description:
|
||||
"The maximum number of tokens to generate in an individual generation",
|
||||
},
|
||||
}),
|
||||
});
|
||||
|
||||
export type GraphConfig = LangGraphRunnableConfig<
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ export async function loadModel(config: GraphConfig, task: Task) {
|
|||
thinking: { budget_tokens: thinkingBudgetTokens, type: "enabled" },
|
||||
maxTokens,
|
||||
}
|
||||
: { maxTokens: 5_000 }),
|
||||
: { maxTokens: config.configurable?.maxTokens ?? 10_000 }),
|
||||
});
|
||||
|
||||
return model;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue