-
Notifications
You must be signed in to change notification settings - Fork 3k
fix(core): avoid LM Studio grammar failure #10275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -162,7 +162,6 @@ const FINDING_ITEM_SCHEMA = { | |
| }, | ||
| summary: { | ||
| type: 'string', | ||
| maxLength: 2000, | ||
| description: 'One sentence stating the defect.', | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] R1-1: Still standing β this code is unchanged since the previous round. Removing The five sibling constraints in this same item schema ( Consider keeping β qwen3.8-max via Qwen Code /review (v0.22.2) |
||
| }, | ||
| shortSummary: { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Suggestion] This removes the 2,000-character cap from the schema that
BaseDeclarativeTool.validateToolParamsvalidates against (Ajv enforcesmaxLength), so client-side enforcement ofsummarylength is dropped for every provider, not just the LM Studio endpoint this targets. Verified by probe against the real tool and validator:The codebase already has a layer built for exactly this class of OpenAI-compatible gateway breakage:
relaxSchemaForFunctionCalling(packages/core/src/utils/schemaConverter.ts), applied to tool schemas inconvertGeminiToolsToOpenAI, whose design note (PR 7315) says the constraint is relaxed on the wire only while client-sidevalidateToolParamsstill enforces the full source schema. Also note the five sibling constraints in this same item schema (id64,file4096,failureScenario4000,category64,outcomeNote1000, plusmaxItems: 50) remain, so the change neither preserves the cap where it works nor closes the nested-constraint class that caused this failure.Consider keeping
maxLength: 2000here and stripping it only at the wire layer for OpenAI-compatible endpoints (extendingrelaxSchemaForFunctionCallingper the PR 7315 pattern), or moving the cap intovalidateToolParamValuesso client-side enforcement survives β and updating the new test to pin the wire shape accordingly. If the wire-relaxation route is taken, please add the converter/schemaConverter test asserting the relaxed report_findings wire schema carries nomaxLengthonsummarywhile the source schema keeps it, and confirm it goes red when the relaxation step is removed.β qwen3.8-max via Qwen Code /review (v0.22.2)