Skip to content

Chat Completions API is not fully compatible with OpenAI schema #1428

@AndriiZhydkykh

Description

@AndriiZhydkykh

he /api/v1/chat/completions endpoint is declared as fully compatible with the OpenAI Chat Completions API, but both request and response formats deviate from the official schema.

Steps to Reproduce:

Open Swagger for /api/v1/chat/completions
Review request schema and send a request
Inspect the response body

Actual Result:

Request schema includes non-standard fields:
tool_calls and tool_call_id inside user messages
Response contains invalid values:
usage fields (prompt_tokens, completion_tokens, total_tokens) are always 0
Custom model identifier used:
"model": "chat-agent"

Expected Result:

Request and response must strictly follow OpenAI Chat Completions schema
No unsupported fields in messages
usage must return actual token counts
API should be compatible with standard OpenAI SDKs without modification

Image Image

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions