Open
Conversation
- Add OpenAI Responses API provider integration alongside Anthropic and OpenRouter - Implement ConvertAnthropicRequestToOpenAIRequest for request conversion - Convert messages, tools, tool_choice to OpenAI format - Support thinking/reasoning configuration - Handle tool results and function call responses - Implement ConvertOpenAIStreamToAnthropicStream for stream conversion - Convert streaming events to Anthropic event format - Handle text deltas, reasoning deltas, function calls - Support ResponseBuilder for collecting full response - Add OpenAI provider configuration support in profile system - Add OpenAIConfig with base_url and api_key - Update profile loading to include OpenAI config - Add getter methods for safe config access - Integrate OpenAI provider routing in serve.go - Add ProviderOpenAI constant - Route requests to OpenAI Responses API when profile.provider == "openai" - Add snapshot support for OpenAI requests/responses - Fix provider.go endpoint path from /responses to /v1/responses 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Use a type alias inside the UnmarshalJSON method to avoid calling the same method recursively when unmarshaling JSON arrays. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add TestCreateOpenAIModelResponse_Basic for basic streaming test - Add TestCreateOpenAIModelResponse_DataFormat for response structure validation - Add TestCreateOpenAIModelResponse_WithReasoning for o3-mini reasoning test - Add TestCreateOpenAIModelResponse_FunctionCalls for tool calling test - Add validateOpenAIEvent and validateOpenAIResponse helper functions - Fix ResponseReasoningItem.Summary to use array type instead of pointer - Fix provider.go template to include .ctx for OpenAI api_key config 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add OPENAI_BASE_URL and OPENAI_API_KEY to CI environment to enable OpenAI Response API tests. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…ng images When converting Anthropic system messages to OpenAI format: - If all system content is text, use the `instructions` field - If system content contains images or other non-text content, convert to an input message with `system` role 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add tests verifying the Anthropic to OpenAI system message conversion: - Text-only system messages convert to instructions field - System messages with images convert to input with system role - Empty and nil system messages are handled correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
6b1ece6 to
693ab2d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Request Conversion (
pkg/adapter/convert_request.go):Stream Conversion (
pkg/adapter/convert_stream.go):Profile Configuration (
pkg/profile/):OpenAIConfigwithbase_urlandapi_keyServer Integration (
cmd/claude-code-adapter-cli/serve.go):ProviderOpenAIconstantprofile.provider == "openai"Snapshot Support (
pkg/snapshot/):OpenAIRequestandOpenAIResponsefieldsOpenAIConfigto snapshot configTest plan
🤖 Generated with Claude Code