Skip to content

xlbljz/ccr-plugin-openai-res

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CCR Plugin · OpenAI Responses Transformer

中文说明

This repository packages a custom transformer for Claude Code Router that translates Claude Code requests to the OpenAI Responses API and adapts streaming responses back into Chat Completions format.

If this plugin saves you time, please consider giving the repo a ⭐️!

Features

  • Preserves system instructions, metadata, and token limits from Claude Code requests.
  • Normalizes tool definitions into the { type: "function", name, parameters } schema required by the Responses API.
  • Reconstructs streaming tool_calls by interpreting response.output_item.added and response.function_call_arguments.delta events.

Installation

  1. Copy .claude-code-router/plugins/responses-api.js into your local Claude Code Router plugins directory, typically ~/.claude-code-router/plugins.

  2. Register the transformer inside ~/.claude-code-router/config.json:

    {
      "transformers": [
        { "path": "~/.claude-code-router/plugins/responses-api.js" }
      ]
    }
  3. Restart Claude Code Router and test any workflow that requires tool execution.

License

Released under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published