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
4 changes: 4 additions & 0 deletions inference_gateway/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@
MessagesToolResultBlock,
MessagesToolUseBlock,
MessagesUsage,
Modality,
Model,
ModelModalities,
Pricing,
Provider,
Response,
Expand Down Expand Up @@ -108,6 +110,8 @@
"MessageContent",
"MessageRole",
"ListModelsResponse",
"Modality",
"ModelModalities",
"CreateChatCompletionRequest",
"CreateChatCompletionResponse",
"CreateChatCompletionStreamResponse",
Expand Down
75 changes: 47 additions & 28 deletions inference_gateway/models.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 40 additions & 14 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -256,16 +256,22 @@ paths:
owned_by: 'openai'
served_by: 'openai'
modalities:
- text
- image
- id: 'openai/gpt-4-turbo'
input:
- text
- image
output:
- text
- id: 'openai/gpt-image-2'
object: 'model'
created: 1687882410
owned_by: 'openai'
served_by: 'openai'
modalities:
- text
- image
input:
- text
- image
output:
- image
'400':
description: Bad request - unsupported include value
content:
Expand Down Expand Up @@ -1630,16 +1636,9 @@ components:
$ref: '#/components/schemas/Provider'
modalities:
oneOf:
- type: array
items:
type: string
enum:
- text
- image
- audio
- video
- $ref: '#/components/schemas/ModelModalities'
- type: 'null'
description: The modalities the model supports natively (included when `include=modalities`)
description: The input and output modalities of the model (included when `include=modalities`)
context_window:
oneOf:
- $ref: '#/components/schemas/ContextWindow'
Expand All @@ -1656,6 +1655,33 @@ components:
- created
- owned_by
- served_by
Modality:
type: string
description: A single input or output modality
enum:
- text
- image
- audio
- video
ModelModalities:
type: object
description: >-
The input and output modalities of a model, mirroring the models.dev dataset shape.
Vision models accept `image` in `input`; image-generation models list `image` in
`output` — when `output` carries `image` but not `text`, the model only generates
images and cannot chat.
properties:
input:
type: array
items:
$ref: '#/components/schemas/Modality'
output:
type: array
items:
$ref: '#/components/schemas/Modality'
required:
- input
- output
ListModelsResponse:
type: object
description: Response structure for listing models
Expand Down