Versions in this module Expand all Collapse all v6 v6.9.3 Mar 25, 2026 Changes in this version + func HasResponseTransformer(from, to Format) bool + func HasResponseTransformerByFormatName(from, to Format) bool + func Register(from, to Format, request RequestTransform, response ResponseTransform) + func TranslateNonStream(ctx context.Context, from, to Format, model string, ...) []byte + func TranslateNonStreamByFormatName(ctx context.Context, from, to Format, model string, ...) []byte + func TranslateRequest(from, to Format, model string, rawJSON []byte, stream bool) []byte + func TranslateRequestByFormatName(from, to Format, model string, rawJSON []byte, stream bool) []byte + func TranslateStream(ctx context.Context, from, to Format, model string, ...) [][]byte + func TranslateStreamByFormatName(ctx context.Context, from, to Format, model string, ...) [][]byte + func TranslateTokenCount(ctx context.Context, from, to Format, count int64, rawJSON []byte) []byte + func TranslateTokenCountByFormatName(ctx context.Context, from, to Format, count int64, rawJSON []byte) []byte + type Format string + const FormatAntigravity + const FormatClaude + const FormatCodex + const FormatGemini + const FormatGeminiCLI + const FormatOpenAI + const FormatOpenAIResponse + func FromString(v string) Format + func (f Format) String() string + type Pipeline struct + func NewPipeline(registry *Registry) *Pipeline + func (p *Pipeline) TranslateRequest(ctx context.Context, from, to Format, req RequestEnvelope) (RequestEnvelope, error) + func (p *Pipeline) TranslateResponse(ctx context.Context, from, to Format, resp ResponseEnvelope, ...) (ResponseEnvelope, error) + func (p *Pipeline) UseRequest(mw RequestMiddleware) + func (p *Pipeline) UseResponse(mw ResponseMiddleware) + type Registry struct + func Default() *Registry + func NewRegistry() *Registry + func (r *Registry) HasResponseTransformer(from, to Format) bool + func (r *Registry) Register(from, to Format, request RequestTransform, response ResponseTransform) + func (r *Registry) TranslateNonStream(ctx context.Context, from, to Format, model string, ...) []byte + func (r *Registry) TranslateRequest(from, to Format, model string, rawJSON []byte, stream bool) []byte + func (r *Registry) TranslateStream(ctx context.Context, from, to Format, model string, ...) [][]byte + func (r *Registry) TranslateTokenCount(ctx context.Context, from, to Format, count int64, rawJSON []byte) []byte + type RequestEnvelope struct + Body []byte + Format Format + Model string + Stream bool + type RequestHandler func(ctx context.Context, req RequestEnvelope) (RequestEnvelope, error) + type RequestMiddleware func(ctx context.Context, req RequestEnvelope, next RequestHandler) (RequestEnvelope, error) + type RequestTransform func(model string, rawJSON []byte, stream bool) []byte + type ResponseEnvelope struct + Body []byte + Chunks [][]byte + Format Format + Model string + Stream bool + type ResponseHandler func(ctx context.Context, resp ResponseEnvelope) (ResponseEnvelope, error) + type ResponseMiddleware func(ctx context.Context, resp ResponseEnvelope, next ResponseHandler) (ResponseEnvelope, error) + type ResponseNonStreamTransform func(ctx context.Context, model string, ...) []byte + type ResponseStreamTransform func(ctx context.Context, model string, ...) [][]byte + type ResponseTokenCountTransform func(ctx context.Context, count int64) []byte + type ResponseTransform struct + NonStream ResponseNonStreamTransform + Stream ResponseStreamTransform + TokenCount ResponseTokenCountTransform v6.9.2-rc1 Mar 25, 2026