From 001d38228a29c09757103fd8e26e0a2dd85967aa Mon Sep 17 00:00:00 2001 From: Brace Sproul Date: Wed, 11 Jun 2025 17:50:21 -0700 Subject: [PATCH] fix: Increase the default max num of planning actions (#126) --- packages/shared/src/open-swe/types.ts | 41 ++++++++++++++------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/packages/shared/src/open-swe/types.ts b/packages/shared/src/open-swe/types.ts index 7a0a3db9..8f54fa0a 100644 --- a/packages/shared/src/open-swe/types.ts +++ b/packages/shared/src/open-swe/types.ts @@ -176,6 +176,16 @@ export const GraphConfigurationMetadata: { | { type: "hidden" }; }; } = { + maxContextActions: { + x_open_swe_ui_config: { + type: "number", + default: 10, + min: 1, + max: 50, + description: + "Maximum number of context gathering actions during planning", + }, + }, plannerModelName: { x_open_swe_ui_config: { type: "select", @@ -266,16 +276,6 @@ export const GraphConfigurationMetadata: { description: "Controls randomness (0 = deterministic, 2 = creative)", }, }, - maxContextActions: { - x_open_swe_ui_config: { - type: "number", - default: 6, - min: 1, - max: 20, - description: - "Maximum number of context gathering actions during planning", - }, - }, maxTokens: { x_open_swe_ui_config: { type: "number", @@ -294,6 +294,17 @@ export const GraphConfigurationMetadata: { }; export const GraphConfiguration = z.object({ + /** + * The maximum number of context gathering actions to take during planning. + * Each action consists of 2 messages (request & result), plus 1 human message. + * Total messages = maxContextActions * 2 + 1 + * @default 10 + */ + maxContextActions: z + .number() + .optional() + .langgraph.metadata(GraphConfigurationMetadata.maxContextActions), + /** * The model ID to use for the planning step. * This includes initial planning, and rewriting. @@ -391,16 +402,6 @@ export const GraphConfiguration = z.object({ .optional() .langgraph.metadata(GraphConfigurationMetadata.summarizerTemperature), - /** - * The maximum number of context gathering actions to take during planning. - * Each action consists of 2 messages (request & result), plus 1 human message. - * Total messages = maxContextActions * 2 + 1 - * @default 6 - */ - maxContextActions: z - .number() - .optional() - .langgraph.metadata(GraphConfigurationMetadata.maxContextActions), /** * The maximum number of tokens to generate in an individual generation. * @default 10_000