Make gateway Open Responses compliant

This commit is contained in:
2026-03-02 04:21:29 +00:00
parent 47d517c913
commit 3e645a3525
6 changed files with 858 additions and 453 deletions

View File

@@ -14,8 +14,8 @@ import (
// Provider represents a unified interface that each LLM provider must implement.
type Provider interface {
Name() string
Generate(ctx context.Context, req *api.ResponseRequest) (*api.Response, error)
GenerateStream(ctx context.Context, req *api.ResponseRequest) (<-chan *api.StreamChunk, <-chan error)
Generate(ctx context.Context, messages []api.Message, req *api.ResponseRequest) (*api.ProviderResult, error)
GenerateStream(ctx context.Context, messages []api.Message, req *api.ResponseRequest) (<-chan *api.ProviderStreamDelta, <-chan error)
}
// Registry keeps track of registered providers and model-to-provider mappings.