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

@@ -1,6 +1,7 @@
package responses
import (
"bytes"
"crypto/rand"
"math/big"
"strings"
@@ -19,7 +20,9 @@ import (
// - tools[].parameters -> tools[].input_schema
// - max_output_tokens -> max_tokens
// - stream passthrough via parameter
func ConvertOpenAIResponsesRequestToClaude(modelName string, rawJSON []byte, stream bool) []byte {
func ConvertOpenAIResponsesRequestToClaude(modelName string, inputRawJSON []byte, stream bool) []byte {
rawJSON := bytes.Clone(inputRawJSON)
// Base Claude message payload
out := `{"model":"","max_tokens":32000,"messages":[]}`