Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion swagger/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -5347,6 +5347,14 @@ const docTemplate = `{
"stream": {
"type": "boolean"
},
"stream_options": {
"description": "StreamOptions opts into OpenAI streaming extensions, e.g. include_usage.",
"allOf": [
{
"$ref": "#/definitions/schema.StreamOptions"
}
]
},
"temperature": {
"type": "number"
},
Expand Down Expand Up @@ -5412,7 +5420,12 @@ const docTemplate = `{
"type": "string"
},
"usage": {
"$ref": "#/definitions/schema.OpenAIUsage"
"description": "Usage is intentionally a pointer with omitempty: per the OpenAI\nchat-completion streaming spec, intermediate chunks must not carry\na ` + "`" + `usage` + "`" + ` field. Marshalling a value-typed usage would emit\n` + "`" + `\"usage\":{\"prompt_tokens\":0,...}` + "`" + ` on every chunk and break\nOpenAI-SDK consumers that filter on a truthy ` + "`" + `result.usage` + "`" + `\n(continuedev/continue, Kilo Code, Roo Code, etc.).",
"allOf": [
{
"$ref": "#/definitions/schema.OpenAIUsage"
}
]
}
}
},
Expand Down Expand Up @@ -5578,6 +5591,14 @@ const docTemplate = `{
}
}
},
"schema.StreamOptions": {
"type": "object",
"properties": {
"include_usage": {
"type": "boolean"
}
}
},
"schema.SysInfoModel": {
"type": "object",
"properties": {
Expand Down
23 changes: 22 additions & 1 deletion swagger/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -5344,6 +5344,14 @@
"stream": {
"type": "boolean"
},
"stream_options": {
"description": "StreamOptions opts into OpenAI streaming extensions, e.g. include_usage.",
"allOf": [
{
"$ref": "#/definitions/schema.StreamOptions"
}
]
},
"temperature": {
"type": "number"
},
Expand Down Expand Up @@ -5409,7 +5417,12 @@
"type": "string"
},
"usage": {
"$ref": "#/definitions/schema.OpenAIUsage"
"description": "Usage is intentionally a pointer with omitempty: per the OpenAI\nchat-completion streaming spec, intermediate chunks must not carry\na `usage` field. Marshalling a value-typed usage would emit\n`\"usage\":{\"prompt_tokens\":0,...}` on every chunk and break\nOpenAI-SDK consumers that filter on a truthy `result.usage`\n(continuedev/continue, Kilo Code, Roo Code, etc.).",
"allOf": [
{
"$ref": "#/definitions/schema.OpenAIUsage"
}
]
}
}
},
Expand Down Expand Up @@ -5575,6 +5588,14 @@
}
}
},
"schema.StreamOptions": {
"type": "object",
"properties": {
"include_usage": {
"type": "boolean"
}
}
},
"schema.SysInfoModel": {
"type": "object",
"properties": {
Expand Down
19 changes: 18 additions & 1 deletion swagger/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1650,6 +1650,10 @@ definitions:
stop: {}
stream:
type: boolean
stream_options:
allOf:
- $ref: '#/definitions/schema.StreamOptions'
description: StreamOptions opts into OpenAI streaming extensions, e.g. include_usage.
temperature:
type: number
tfz:
Expand Down Expand Up @@ -1698,7 +1702,15 @@ definitions:
object:
type: string
usage:
$ref: '#/definitions/schema.OpenAIUsage'
allOf:
- $ref: '#/definitions/schema.OpenAIUsage'
description: |-
Usage is intentionally a pointer with omitempty: per the OpenAI
chat-completion streaming spec, intermediate chunks must not carry
a `usage` field. Marshalling a value-typed usage would emit
`"usage":{"prompt_tokens":0,...}` on every chunk and break
OpenAI-SDK consumers that filter on a truthy `result.usage`
(continuedev/continue, Kilo Code, Roo Code, etc.).
type: object
schema.OpenAIUsage:
properties:
Expand Down Expand Up @@ -1813,6 +1825,11 @@ definitions:
$ref: '#/definitions/schema.NodeData'
type: array
type: object
schema.StreamOptions:
properties:
include_usage:
type: boolean
type: object
schema.SysInfoModel:
properties:
id:
Expand Down
Loading