openai / openai/openai-openapi
Proposal: Add capabilities field to /v1/models response
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 2.5k
- Forks
- 527
- Avg merge
- 1h 46m
- Merged PRs (30d)
- 2
Description
Problem
Every LLM framework (LangChain, LiteLLM, Vercel AI SDK, etc.) maintains its own hardcoded model registry to answer basic questions like:
- Does this model support tool/function calling?
- Does it support vision (image inputs)?
- Does it support structured output / JSON mode?
- What is the context window size?
These registries are always stale, always incomplete, and always divergent. Every new model release triggers a wave of PRs across dozens of repos just to update capability flags.
Root Cause
The /v1/models endpoint returns almost no useful metadata:
{
"id": "gpt-4o",
"object": "model",
"created": 1715367049,
"owned_by": "system"
}
There is no machine-readable way to discover what a model can actually do.
Proposal
Add a capabilities object to the /v1/models/{model} response:
{
"id": "gpt-4o",
"object": "model",
"created": 1715367049,
"owned_by": "system",
"capabilities": {
"tool_calling": true,
"vision": true,
"structured_output": true,
"json_mode": true,
"streaming": true,
"context_window": 128000,
"max_output_tokens": 16384
}
}
This is a backwards-compatible, additive change. Existing clients would simply ignore the new field.
Impact
- Eliminates the need for hardcoded model registries across the ecosystem
- Enables dynamic capability negotiation (agents can adapt to whatever model they are given)
- Reduces maintenance burden for every framework that builds on the OpenAI-compatible API
- Sets a standard that other providers (Anthropic, Google, Mistral, etc.) can adopt
Prior Art
- Blog post with detailed analysis: https://h3manth.com/scribe/model-capability-discovery/
- Hardware and browser APIs have long exposed capability discovery (e.g.,
navigator.mediaDevices, OpenGL extensions)
This would be a small schema change with outsized ecosystem impact.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the OpenAPI schema for the /v1/models endpoint and compare the collection and per-model response shapes. Done means the schema defines the proposed capabilities object and its listed fields while preserving the existing response fields and documenting the additive behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100