Summary
With pi 0.87.1 and a model that supports strict tools (anthropic/claude-opus-5-5), every request fails once pi-agent-browser-native@0.7.1 is loaded:
400 {"type":"error","error":{"type":"invalid_request_error","message":"tools.25.custom: For 'integer' type, properties maximum, minimum are not supported"}}
agent_browser_code registers constrainedSampling: { type: "json_schema", strict: "prefer" }, and createAgentBrowserCodeParamsSchema() contains keywords Anthropic strict mode doesn't accept:
timeoutMs: Type.Integer({ minimum: 1, maximum: AGENT_BROWSER_CODE_MAX_TIMEOUT_MS })
code: Type.String({ minLength: 1, maxLength: 65_536 }), session: Type.String({ minLength: 1 })
Pi's strict conversion currently passes them through unchanged (reported upstream: earendil-works/pi#9953), so the whole session breaks, not just this tool.
Suggested fix
Until pi sanitizes this, either drop constrainedSampling from agent_browser_code, or keep it but move the bounds into descriptions and enforce them in execute (the runtime check is needed anyway).
Local workaround confirmed: commenting out the constrainedSampling line in dist/extensions/agent-browser/lib/tool-surface.js makes the schema error go away.
Summary
With pi 0.87.1 and a model that supports strict tools (
anthropic/claude-opus-5-5), every request fails oncepi-agent-browser-native@0.7.1is loaded:agent_browser_coderegistersconstrainedSampling: { type: "json_schema", strict: "prefer" }, andcreateAgentBrowserCodeParamsSchema()contains keywords Anthropic strict mode doesn't accept:timeoutMs: Type.Integer({ minimum: 1, maximum: AGENT_BROWSER_CODE_MAX_TIMEOUT_MS })code: Type.String({ minLength: 1, maxLength: 65_536 }),session: Type.String({ minLength: 1 })Pi's strict conversion currently passes them through unchanged (reported upstream: earendil-works/pi#9953), so the whole session breaks, not just this tool.
Suggested fix
Until pi sanitizes this, either drop
constrainedSamplingfromagent_browser_code, or keep it but move the bounds into descriptions and enforce them inexecute(the runtime check is needed anyway).Local workaround confirmed: commenting out the
constrainedSamplingline indist/extensions/agent-browser/lib/tool-surface.jsmakes the schema error go away.