fix(swagger): describe backend metadata as an object

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
This commit is contained in:
localai-org-maint-bot committed 2026-09-21 03:07:40 +00:00
1 parent 19a66fd898
commit 714140dd26
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: