Skip to content

[Provider compatibility] Devin Claude rejects root oneOf tool schemas on /v1/responses #8302

Closed

Description

@AlexanderWei666

Client or integration

Codex App; also reproduced with a direct HTTP client.

Provider or upstream service

Devin / Cognition (devin adapter, OAuth).

OpenCodex version

@bitkyc08/opencodex 2.98.0 on Windows 11.

Endpoint or capability

POST /v1/responses: function-tool parameter schema translation to Devin's GetChatMessage.

Current behaviour

A short request with a function tool whose parameter schema has a root oneOf is rejected on devin/claude-opus-5-5 with invalid_argument, before any text or tool call is returned. In non-streaming mode, the HTTP response is 200 but the Responses object has status: "failed"; clients must inspect the response status. A Codex App turn also failed with the same error and retried five times.

Expected behaviour

A valid Codex/MCP tool definition should remain usable when routed to a Devin Claude model, including tool argument validation. If a schema cannot be translated safely, report a clear compatibility error instead of an opaque upstream failure.

Minimal redacted request or reproduction

With an already configured and authenticated Devin provider, POST this synthetic JSON to the local /v1/responses endpoint:

{
  "model": "devin/claude-opus-5-5",
  "input": "Call probe with a set to ok.",
  "max_output_tokens": 64,
  "stream": false,
  "store": false,
  "tools": [
    {
      "type": "function",
      "name": "probe",
      "description": "Probe tool.",
      "parameters": {
        "oneOf": [
          {
            "type": "object",
            "properties": { "a": { "type": "string" } },
            "required": ["a"],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": { "b": { "type": "string" } },
            "required": ["b"],
            "additionalProperties": false
          }
        ]
      }
    }
  ]
}

Observed controls:

  • devin/claude-opus-5-5, short prompt without tools, including reasoning.effort: high: completed with OK.
  • The synthetic oneOf probe above: Claude returned status: failed with invalid_argument. With the same probe schema on devin/swe-2 and reasoning.effort: high, the response completed and produced a probe call with {"a":"ok"}.
  • In a separate A/B using the mcp__cua_repl.js definition generated by the same local Codex runtime, a short Claude request at high failed with the tool's root oneOf present and completed with OK when only that root keyword was removed. This checked request acceptance, not execution of the tool.

Actual response or error

response.status: failed
error.type: invalid_request_error
error.code: invalid_argument
Devin cloud error invalid_argument: Cognition chat failed (invalid_argument)

The original Codex App turn was streamed; the reduced HTTP probes above were non-streaming. The original Desktop request's complete tool list was not retained, so the particular tool responsible for that historical failure is not confirmed.

Upstream documentation

No public specification for Cognition's unofficial GetChatMessage request format was located. The expected behaviour is based on the Codex/MCP tool contract and the controlled request comparisons above.

Suggested mapping or implementation notes

In 2.98.0, the Devin tool encoder calls normalizeDevinToolParameters, which rewrites Gemini type arrays but returns other models' parameters unchanged. buildTools adds an object root when necessary, leaving the root oneOf in the synthetic example.

PR #8163 addresses root compositions for Claude via openai-chat, but the Devin cloud-direct adapter uses a separate path. Consider a Claude-specific Devin normalization, preserving or validating the original constraints when converting. Simply deleting a root oneOf weakens required/alternative constraints; untranslatable cases need an explicit safe outcome. Regression coverage should include the failing schema, argument validation, and an unchanged SWE-2 path. Only root oneOf was tested in this OCX investigation; anyOf and allOf remain unverified here.

Additional context and attachments

Magpie issue #1196 describes a similar Cognition/Claude root-composition issue in a different gateway. No credentials, account identifiers, local paths, trace IDs, private conversation content, or raw logs are included here.

Checks

  • I searched existing provider and compatibility issues.
  • The request and response were redacted.
  • The expected behaviour is based on a concrete client requirement.

Activity

  1. added
    provider-compatibility
    provider
    tools
    on Nov 7, 2026
  2. Ingwannu commented on Nov 8, 2026

    @Ingwannu
    Owner

    Confirmed in code on dev (f8dfc2f). The Devin Cognition encoder has no root-composition handling:

    • src/adapters/devin/cloud-direct/chat.ts:687-694 (encodeToolDef) sends the parameters through normalizeDevinToolParameters.
    • src/adapters/devin/cloud-direct/tool-schema.ts:83-85 rewrites schemas only for Gemini UIDs. Claude UIDs get the root oneOf unchanged.
    • src/responses/parser-tools.ts:45-47 only adds type: "object" when it is missing.

    PR #8163 (merged) flattens Claude root compositions only on the openai-chat path. The Devin path is separate and was not covered.

    We have not reproduced this against Devin ourselves, so your probes are the evidence. Untested: anyOf and allOf roots.

    Possible fix shape (not implemented): for Claude UIDs, apply the same bounded root flattening used by #8163 before encodeToolDef serializes the schema. Deleting the root oneOf would drop the alternative constraints, so it should not be the approach. A schema that cannot be translated safely should return a local 400 with a clear message instead of an opaque invalid_argument.

    Could you confirm whether an anyOf root fails the same way on Claude?

  3. added a commit that references this issue on Nov 10, 2026
    42e3e04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    providerprovider-compatibilitytools

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions