Add OpenAI Responses support

This commit is contained in:
Luis Pater
2025-09-01 17:38:24 +08:00
parent e11637dc62
commit 3acdec51bd
54 changed files with 2394 additions and 144 deletions

View File

@@ -6,6 +6,7 @@
package claude
import (
"bytes"
"fmt"
"github.com/luispater/CLIProxyAPI/internal/misc"
@@ -31,7 +32,9 @@ import (
//
// Returns:
// - []byte: The transformed request data in internal client format
func ConvertClaudeRequestToCodex(modelName string, rawJSON []byte, _ bool) []byte {
func ConvertClaudeRequestToCodex(modelName string, inputRawJSON []byte, _ bool) []byte {
rawJSON := bytes.Clone(inputRawJSON)
template := `{"model":"","instructions":"","input":[]}`
instructions := misc.CodexInstructions