Implement OpenAI-to-Anthropic proxy with streaming support

- Add request/response converters (OpenAI <-> Anthropic formats)
- Implement SSE streaming conversion (Anthropic events -> OpenAI SSE)
- Add /v1/models endpoint with Claude model list
- Add /v1/chat/completions endpoint with streaming and non-streaming support
- Fix context key type matching bug (sessionIDKey)
- Configurable upstream URL via config.yaml
- Mimic claude-code CLI headers for upstream requests
This commit is contained in:
Franz Kafka 2026-04-15 06:29:03 +00:00
parent 87a74edbf5
commit 8450d96e2e
10 changed files with 1270 additions and 0 deletions

8
go.mod Normal file
View file

@ -0,0 +1,8 @@
module github.com/penal-colony/proxx
go 1.24.1
require (
github.com/google/uuid v1.6.0
gopkg.in/yaml.v3 v3.0.1
)