Skip to content

feat(claude): Support calling Claude channels via /v1/responses - #2892

Closed
Redtropig wants to merge 5199 commits into
QuantumNous:mainfrom
Redtropig:feat/claude-responses-compat
Closed

feat(claude): Support calling Claude channels via /v1/responses#2892
Redtropig wants to merge 5199 commits into
QuantumNous:mainfrom
Redtropig:feat/claude-responses-compat

Conversation

@Redtropig

@Redtropig Redtropig commented Feb 7, 2026

Copy link
Copy Markdown

(incl. OpenAI function call --> Claude tool use)
Set "ChatCompletions→Responses 兼容配置" && "Model mapping" to test.

  • Implement ConvertOpenAIResponsesRequest and DoResponsesRequest in Claude adaptor to support the experimental OpenAI Responses API.
  • Add RequestOpenAIResponses2ClaudeMessage to convert Responses inputs to Claude messages, featuring validation to skip empty text blocks causing API errors.
  • Implement response conversion logic in ResponseClaude2OpenAIResponses, correctly mapping Claude's tool_use to function_call outputs.
  • Update ResponsesResponseToChatCompletionsResponse in compatibility service to support messages containing both text and tool calls, ensuring reasoning text is not discarded when tools are used.

-> Tested working config:
image image

Summary by CodeRabbit

  • New Features

    • Added Claude backend support for OpenAI-style "responses" requests, including request/response translation, routing so "responses" mode uses the Claude pathway, and streaming (SSE) support with conversion to OpenAI-style streaming.
  • Bug Fixes

    • Improved tool/function-call handling: tool_calls are captured even when text is present and assistant content is no longer cleared.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.