Skip to content

Kimi built-in assistant consumes credits but gives "HTTP 422: Unprocessable Entity" #657

@kahloutg

Description

@kahloutg
Image

Summary:
When BrowserOS forwards agent/graph-mode MCP payloads containing BrowserOS-only fields (for example: response_format with json_schema+strict, parallel_tool_calls, tools/tool_calls) to Moonshot (model: kimi-k2.5), the provider rejects or errors on those fields. Minimal chat payloads (model + messages) succeed.

Observed behavior:

  • Minimal request (model + messages) → 200 OK.
  • response_format with empty/missing json_schema.name → 400 (e.g., 'missing required parameter: response_format.json_schema.name').
  • parallel_tool_calls can time out or cause connection resets; behavior inconsistent (sometimes 200, sometimes 502/timeout).
  • Using a local proxy that strips BrowserOS-only fields often makes the request succeed, though the provider returned intermittent 429/502 under test load.

Environment:

  • BrowserOS: 0.44.0.1
  • Chromium: 146.0.7821.31
  • Local BrowserOS MCP endpoint: /mcp (localhost)
  • Provider: Moonshot / Kimi (https://api.moonshot.ai/v1, model: kimi-k2.5)

Reproduction (representative payloads):

  1. Baseline payload that should succeed: { model: 'kimi-k2.5', messages: [...] }
  2. response_format payload (provider returned 4xx): { model: 'kimi-k2.5', messages: [...], response_format: { type: 'json_schema', strict: true, json_schema: {} } }
  3. parallel_tool_calls payload (provider may timeout or return connection errors): { model: 'kimi-k2.5', messages: [...], parallel_tool_calls: { calls: [ { tool: 'open_url', args: { url: 'https://example.com' } } ] } }

Findings & suggested fixes:

  1. Payload sanitization: add a compatibility mode to strip BrowserOS-agent-only fields before forwarding to third-party providers.
  2. Provider capability profiles: per-provider feature flags (e.g., supports_parallel_tool_calls, supports_json_schema_response_format).
  3. Optional validation/preflight to detect unsupported fields and return actionable errors to users.
  4. Better error mapping: interpret provider 4xx messages and surface guidance to end users.
  5. Documentation: list which payload features are safe to forward to third-party providers; include example proxy used for diagnostics.

Attachments: none (reporter requested no captures attached). Redaction guidance: do not include Authorization/API keys, user emails, or internal hostnames/IPs.

If it helps, the reporter can provide anonymized capture files (Authorization headers redacted) on request.

-- Reported by BrowserOS user

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions