fix(coding-agent): use valid JSON schema for submit_result when no output schema specified
Replace Type.Any() with Type.Object({}, { additionalProperties: true }) in the
submit_result tool's fallback data schema. Type.Any() serializes to
{"description": "..."} which lacks the required 'type' field for valid
JSON Schema. Strict providers (e.g. MiniMax, Cloud Code Assist) reject this
with 400 Unrecognized schema errors.
The fix produces {"type": "object", "additionalProperties": true, ...}
which conforms to JSON Schema draft 2020-12 while preserving the same
permissive acceptance of arbitrary structured output.
Fixes schema rejection observed with:
- MiniMax API (via zuccaro/bryce proxy)
- Cloud Code Assist (Claude) - related to #45
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
42a00ba425
commit
b9cda5bbd4
@@ -89,7 +89,7 @@ export class SubmitResultTool implements AgentTool<TObject, SubmitResultDetails>
|
||||
...(normalizedSchema as object),
|
||||
description: `Structured output matching the schema:\n${schemaHint}`,
|
||||
})
|
||||
: Type.Any({ description: "Structured JSON output (no schema specified)" });
|
||||
: Type.Object({}, { additionalProperties: true, description: "Structured JSON output (no schema specified)" });
|
||||
|
||||
this.parameters = Type.Object({
|
||||
data: Type.Optional(dataSchema),
|
||||
|
||||
Reference in New Issue
Block a user