check-api-compat
Skill683 starsChanged 19 days agoApache-2.0View on GitHub
Determine the correct behavior of vLLM's OpenAI-compatible or Anthropic-compatible API by checking the official upstream spec, instead of guessing from vLLM's own code. Use for any bug, issue, PR, review, or question touching /v1/chat/completions, /v1/completions, /v1/responses, /v1/embeddings, /v1/messages, or their request/response models — including "is this a bug or intended", "what should this field default to", "does upstream allow this", and any change that adds, removes, or renames a field on those models. Do not use for vLLM-internal APIs (engine, scheduler, LLM class) or for endpoints with no upstream counterpart.
2 other projects use a version of this; 2 new projects in the last 4 weeks, against 0 the 4 before.
Adopted by
Surging: 2 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Most recently taken up by
- guqiong96/Lvllmword for word, first seen Nov 9, 2026
- vllm-project/vllmword for word, first seen Oct 8, 2026
Other versions2 projects use a version of this.
Word for word · 2
- vllm-project/vllm★ 97k100% same
- guqiong96/Lvllm★ 475100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- rust/AGENTS.mdAGENTS.md
- tests/AGENTS.mdAGENTS.md
- ci-fails-buildkiteSkill
- debug-imaSkill
- kernel-microbenchmarkSkill
- model-microbenchmarkSkill
- model-recipesSkill
- pr-checklistSkill
- transformers-upgradeSkill
- triton-kernel-writingSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Never answer "what should this field do" from memory.
- Distinctive: line 47
Prefer a source that can actually be read as text, in this order.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Checking vLLM API compatibility against the upstream spec
vLLM's OpenAI and Anthropic server surfaces are reimplementations of someone else's spec. vLLM's own code, tests, and docstrings are not evidence of correct behavior — they are the thing under test. Establish what upstream says first, then compare.
Never answer "what should this field do" from memory. Field names, types, and especially defaults drift between spec versions.
1. Pin down the question
Name three things before looking anything up:
- Which surface — OpenAI-compatible or Anthropic-compatible. They are separate code paths in vLLM and separate specs.
- Which endpoint, by path.
- Which field or behavior — a request field, a response field, a streaming event shape, an error code, or a status code.
2. Read vLLM's implementation
In a vLLM checkout, the request/response models live beside each endpoint:
| surface | path |
| OpenAI chat | vllm/entrypoints/openai/chat_completion/ |
| OpenAI completions | vllm/entrypoints/openai/completion/ |
| OpenAI responses | vllm/entrypoints/openai/responses/ |
| OpenAI embeddings | vllm/entrypoints/pooling/embed/ |
| OpenAI shared base models, errors, usage | vllm/entrypoints/serve/engine/protocol.py |
| Anthropic messages | vllm/entrypoints/anthropic/ |
| audio | vllm/entrypoints/speech_to_text/*/protocol.py |
Each directory holds protocol.py (the Pydantic models), serving.py (behavior),
and api_router.py (routing and status codes). Read the field declaration and
the code that consumes it — a field can be declared faithfully and then ignored,
which is still an incompatibility.
3. Fetch the upstream spec
Prefer a source that can actually be read as text, in this order.
OpenAI
- The OpenAPI spec — authoritative, machine-readable, and fetches cleanly:
https://raw.githubusercontent.com/openai/openai-openapi/master/openapi.yaml - The installed
openaiPython SDK's typed params, which track the spec closely. Locate them withpython -c "import openai,os;print(os.path.dirname(openai.__file__))", then read e.g.types/chat/completion_create_params.py,types/chat/chat_completion.py,types/chat/chat_completion_chunk.py,types/responses/. Note the SDK version — an old SDK is an old spec. - The prose reference at
https://platform.openai.com/docs/api-reference/...for semantics the types do not carry. It is script-heavy and often fetches poorly; treat a failed fetch as a fetch failure, not as absence of a field.
Anthropic
https://docs.claude.com/en/api/messagesandhttps://docs.claude.com/en/api/messages-streaming— these render as clean text and are the primary source for both fields and streaming event order.- The installed
anthropicSDK'stypes/message_create_params.py,types/message.py,types/raw_message_stream_event.py.
Say which source and which version answered the question, so the finding can be re-checked later.
4. Compare on all four axes
A field is compatible only when name, type, default, and semantics all match. Most real bugs hide in the last two: a field that exists with the right type but the wrong default, or one that is accepted and silently dropped.
Also check, when relevant:
- Streaming — chunk shape, the order of events, and the terminal event
(
data: [DONE]for Chat Completions and Completions;response.completed,response.failed, orresponse.incompletewith no[DONE]for Responses;message_stopfor Anthropic). - Errors — HTTP status and the error body's
type/codestrings. - Omitted vs null — upstream often distinguishes an absent field from an
explicit
null. Pydantic defaults erase that distinction unless the model is written to preserve it.
5. Classify before calling it a bug
Three outcomes, and they are not the same:
- Matches upstream — no action.
- vLLM extension — a field upstream has no name for at all (
vllm_xargs,chat_template_kwargs, sampling knobs likemin_p). These are intentional and allowed. Do not report them as violations. Check per surface:top_kis an extension on OpenAI but a real upstream field on Anthropic Messages. - Incompatibility — a field that shares a name with upstream but differs in type, default, or behavior, or an upstream field that is missing, ignored, or malformed. This is the reportable case.
An unsupported-but-declared field is its own subcase: decide whether vLLM rejects it explicitly or accepts and ignores it, and report which, since silently ignoring a documented field is the more damaging failure.
6. Report
State: the endpoint and field, what upstream specifies (with the source), what
vLLM does (with file:line), which of the three outcomes it is, and the smallest
fix. When behavior turns on a spec detail that is easy to disbelieve, quote the
upstream line rather than paraphrasing it.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

