Skip to content

[API] Add model capabilities for the supported endpoints - #411

Merged
slin1237 merged 3 commits into
ome-projects:mainfrom
kunzheng926:add-model-capabilities
Dec 14, 2025
Merged

slin1237 merged 3 commits into
ome-projects:mainfrom
kunzheng926:add-model-capabilities

Conversation

@kunzheng926

@kunzheng926 kunzheng926 commented Dec 10, 2025 •

Copy link
Copy Markdown
Contributor

What this PR does:

  • Adds an explicit endpoints field and ModelEndpoint enum so models declare which OpenAI v1 endpoints they support.
  • Keeps existing capabilities but stops overloading them for endpoint coverage; new constants cover images, audio, and realtime.
  • Plumbs endpoints through model metadata/config so agents and consumers can see supported endpoints (e.g., gpt-image-1 exposes images/generations and images/edits; grok-2-image exposes only images/generations).

Why we need it:

  • To safely enable newer endpoints (image generation/edits, audio speech/transcription/translation, realtime), callers must know a model’s supported endpoints up front.

Fixes #

How to test

N/A

Checklist

  • Tests added/updated (if applicable)
  • Docs updated (if applicable)
  • make test passes locally

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@github-actions github-actions Bot added the api API/Types changes in pkg/apis label Dec 10, 2025
Comment thread pkg/apis/ome/v1beta1/model.go Outdated
ModelCapabilityUnknown ModelCapability = ""

// Endpoints capabilities
ModelCapability_OpenAI_V1_CHAT_COMPLETIONS ModelCapability = "OPENAI_V1_CHAT_COMPLETIONS"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the diffference between ModelCapability_OpenAI_V1_CHAT_COMPLETIONS and ModelCapabilityChat?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ModelCapability_OpenAI_V1_CHAT_COMPLETIONS indicates that the model runtime explicitly supports the OpenAI v1 /chat/completions API. This capability is tied to a specific provider API.

ModelCapabilityChat, on the other hand, is a legacy, generic chat capability. It does not specify which provider API the model supports (Cohere, OpenAI, Gemini, etc.)

Comment thread pkg/apis/ome/v1beta1/model.go Outdated

// Endpoints capabilities
ModelCapability_OpenAI_V1_CHAT_COMPLETIONS ModelCapability = "OPENAI_V1_CHAT_COMPLETIONS"
ModelCapability_OpenAI_V1_RESPONSES ModelCapability = "OPENAI_V1_RESPONSES"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if the model support v1-chat-completions and v1-responses?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Model capabilities are represented as an array, so a model can include multiple capability values to indicate support for both endpoints.

@github-actions github-actions Bot added model-agent Model agent changes tests Test changes labels Dec 11, 2025
Comment thread pkg/apis/ome/v1beta1/model.go Outdated
// Endpoints supported by the model, e.g., "OPENAI_V1_CHAT_COMPLETIONS"
// +listType=atomic
// +optional
Endpoints []ModelEndpoint `json:"endpoints,omitempty"`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we used Endpoint for other meaning.
The ModelEndpoint is a little confusing.
would you mind change a name?
how about supportedApis, apiCapabilities or others?

@kunzheng926 kunzheng926 Dec 11, 2025 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks. changed to ModelAPICapability and apiCapabilities.

@slin1237
slin1237 merged commit 462005f into ome-projects:main Dec 14, 2025
truddy0 pushed a commit that referenced this pull request Dec 16, 2025
* Add model capabilities for the supported endpoints

* Add new model capacities and endpoints

* Use ModelAPICapability as the name
slin1237 pushed a commit that referenced this pull request Dec 22, 2025
* Add model capabilities for the supported endpoints

* Add new model capacities and endpoints

* Use ModelAPICapability as the name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api API/Types changes in pkg/apis model-agent Model agent changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants