Add upstream model list fetching and a Codex-specific model section

This commit is contained in:
kate522 committed 2026-10-18 19:33:32 +08:00
1 parent d759fe5e5d
commit f3bf1472e7
12 files changed
+339 -16

No files matched your search

+12
View File
@@ -102,6 +102,18 @@ type Error struct {
Code any `json:"code,omitempty"`
}
// ModelInfo is one entry of an upstream model catalog.
type ModelInfo struct {
ID string `json:"id"`
Object string `json:"object,omitempty"`
OwnedBy string `json:"owned_by,omitempty"`
}
// ModelList is the upstream /models response body.
type ModelList struct {
Data []ModelInfo `json:"data"`
}
// StreamChunk is one SSE data payload of a streaming response.
type StreamChunk struct {
ID string `json:"id"`