fix(swagger): describe backend metadata as an object (#12178)

Swag cannot resolve json.RawMessage in OpenAIResponse and aborts the daily
schema generation. Set its Swagger type without changing JSON encoding,
and regenerate the checked-in specifications.

Assisted-by: Codex:gpt-6

Co-authored-by: localai-org-maint-bot <306269227+localai-org-maint-bot@users.noreply.github.com>
This commit is contained in:
localai-org-maint-botandlocalai-org-maint-bot authored and GitHub committed 2026-09-27 21:06:54 +02:00
1 parent a7a6bc2963
commit 4e94c914c9
4 files changed
+9 -1

No files matched your search

+1 -1
View File
@@ -99,7 +99,7 @@ type OpenAIResponse struct {
// OpenAI-SDK consumers that filter on a truthy `result.usage`
// (continuedev/continue, Kilo Code, Roo Code, etc.).
Usage *OpenAIUsage `json:"usage,omitempty"`
Metadata json.RawMessage `json:"metadata,omitempty"`
Metadata json.RawMessage `json:"metadata,omitempty" swaggertype:"object"`
}
// StreamOptions mirrors OpenAI's `stream_options` request field. The only
+3
View File
@@ -7313,6 +7313,9 @@ const docTemplate = `{
"id": {
"type": "string"
},
"metadata": {
"type": "object"
},
"model": {
"type": "string"
},
+3
View File
@@ -7310,6 +7310,9 @@
"id": {
"type": "string"
},
"metadata": {
"type": "object"
},
"model": {
"type": "string"
},
+2
View File
@@ -2266,6 +2266,8 @@ definitions:
type: array
id:
type: string
metadata:
type: object
model:
type: string
object: