Files
openteam/server/internal/proxy/convert_wrappers.go
T
SakurasanandClaude Sonnet 5 d0e31b198f feat(server): API relay gateway backend M0-M4
Gin + GORM + pure-Go SQLite. Users/auth (JWT), API key management with
quotas, proxy gateway with weighted channel failover and health checks,
usage/billing ledger, cross-protocol conversion (Anthropic Messages /
OpenAI Chat Completions / OpenAI Responses), and channel/model admin API.
Channels declare native API formats and auto-convert the rest.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-15 21:05:02 +08:00

18 lines
601 B
Go

package proxy
import (
"openteam/server/internal/proxy/convert"
)
// convertRequest translates a request body from the client protocol to the
// channel provider's native format.
func convertRequest(route Route, provider string, body []byte, upstreamModel string) ([]byte, error) {
return convert.Request(clientProto(route), provider, body, upstreamModel)
}
// convertResponse translates a non-stream upstream response back to the
// client protocol.
func convertResponse(route Route, provider string, body []byte) ([]byte, error) {
return convert.Response(clientProto(route), provider, body)
}