跳到主要内容Skip to main content

接口兼容就等于行为一致A Compatible API Means Identical Behaviour

微型指南 · 约 5 分钟Guide · about 5 min · 引用核验 2026-11-03(仅引用链接与日期) · refs checked 2026-11-03 (reference links and dates only)

兼容保证的是请求与响应的形状。Compatibility guarantees the shape of requests and responses, nothing more.

只要接口兼容 OpenAI,换过去效果就一样。If the API is OpenAI-compatible, switching over gives the same behaviour.

兼容通常指某些请求与响应约定;支持范围、默认参数、流式、工具调用和错误处理仍需逐项核对。接口名称相同不代表产品行为或输出质量相同。Compatibility typically concerns specified request/response conventions. Check supported scope, defaults, streaming, tools and errors individually. Shared interface names do not establish equal behavior or output quality.

例子与判断Example and interpretation

以下是教学情境,不是本站运行或实测记录。A teaching scenario, not a measured or executed site test.

迁移时准备普通回答、结构化输出、流式、工具调用和错误请求各一例。逐项记录返回字段与行为。请求能发送成功,只说明接口链路可用,不代表所有旧功能都保持原样。During migration, test ordinary output, structured output, streaming, tool calls and errors separately. Record fields and behavior. A successful request establishes connectivity, not preservation of every feature.

出处Sources
  • vLLM OpenAI 兼容服务文档vLLM OpenAI-compatible server ↗
围绕这些概念继续读More on these concepts

换模型前怎么迁移评估How to Assess a Model Migration