Skip to content

Fields missing from openRouter.beta.response.send() non stream response #125

@PippaOS

Description

@PippaOS

Version 0.3.10

Code example:

const result = await openRouter.beta.responses.send({
  model: "anthropic/claude-haiku-4.5",
  input: [
    {
      role: "user",
      content: "What is the capital of England?",
    },
  ],
  reasoning: {
    effort: "low",
    enabled: true,
  },
});

console.log(JSON.stringify(result, null, 2));

Expected (from direct API call):

{
    "type": "reasoning",
    "id": "rs_tmp_n0i9n8f49b",
    "summary": [],
    "content": [...],
    "signature": "EvcBCkgIChABGAIqQKkSDbRuVEQUk9qN1odC098l9SEj...",
    "format": "anthropic-claude-v1"
}

Actual from openRouter.beta.response.send():

{
    "type": "reasoning",
    "id": "rs_tmp_s9mddj1ej0m",
    "content": [...],
    "summary": []
    // Missing: "signature" and "format"
}

This is an issue for Anthropic models.
OpenAI and Google models seem OK as they use encryptedContent, but format is missing from all 3.

Here is some analysis from Composer if that helps:

Root Cause

The SDK is correctly following the OpenAPI specification, but the specification is incomplete:

  1. Reasoning Output Items: The output array schema uses OutputItemReasoning which doesn't include signature and format fields. However, there's a separate schema OpenResponsesReasoning that extends OutputItemReasoning and includes these fields, but it's not used in the response schema.

  2. Reasoning Config: The OpenAIResponsesReasoningConfig schema only defines effort and summary fields, but the API actually returns an enabled field as well.

Technical Details

OpenAPI Schema Location

  • Reasoning Output Schema: .speakeasy/in.openapi.yaml lines 226-261 (OutputItemReasoning)
  • Extended Schema with Fields: .speakeasy/in.openapi.yaml lines 3213-3236 (OpenResponsesReasoning)
  • Response Schema: .speakeasy/in.openapi.yaml lines 1192-1210 (uses OutputItemReasoning instead of OpenResponsesReasoning)
  • Reasoning Config Schema: .speakeasy/in.openapi.yaml lines 19-23 (OpenAIResponsesReasoningConfig)

SDK Model Files

  • Reasoning Output Model: src/models/responsesoutputitemreasoning.ts
  • Reasoning Config Model: src/models/openairesponsesreasoningconfig.ts
  • Response Model: src/models/openresponsesnonstreamingresponse.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions