Bind hosted mcp to realtime models the Realtime MCP guide samples name #743 (GitHub #742)
main fromfix/707-openai-realtime-tools·merged by tombeckenham View on GitHubPart of #707
OpenAI realtime rows that the Realtime MCP guide's own samples name now get hosted mcp. That covers 2 of the 12 realtime and live rows in #707. The other 10 stay null with no entry.
Source#
https://developers.openai.com/api/docs/guides/realtime-mcp.md ("Realtime with tools"). The page documents type: "mcp" session tools ("MCP tools are executed by the Realtime API itself"), but it keeps no supported-models list. Its fenced samples put a literal model next to a tools entry of type mcp:
## Configure an MCP tool:model: "gpt-realtime-2.1"withtype: "mcp"andserver_url### Legacy connectors:model: "gpt-realtime-1.5"withtype: "mcp"andconnector_id("The example below usesgpt-realtime-1.5, which predates the cutoff.")
parseOpenAiRealtimeMcp binds mcp only to those ids. The array is example-derived: no table lists the models. Each factSources.serverTools.mcp.path names the heading of the sample it came from, for example Configure an MCP tool (sample). The guide's "Choose a tool type" table lists only function and mcp (server_url or connector_id) for Realtime. mcp is the id OpenAI's Responses rows and BytePlus already use.
Only the TypeScript and Python samples match the tools: [{ type: "mcp" shape; the Go, Java, C# and Ruby samples do not, and a test pins that. A guide whose samples pair no model with mcp throws. An mcp sample that names two distinct models (for example, a transcription model) also throws.
Rows#
| Row | Result |
|---|---|
gpt-realtime-2.1 | ["mcp"] |
gpt-realtime-1.5 | ["mcp"] |
gpt-realtime, gpt-realtime-2025-08-28, gpt-realtime-2, gpt-realtime-2.1-mini, gpt-realtime-mini, gpt-realtime-mini-2025-12-15, gpt-realtime-translate, gpt-realtime-whisper | no entry, absent.serverTools: unavailable (keeps the stored value, null today). The guide does not name them and is not a complete list, so silence would be false. |
gpt-live-1, gpt-live-1.1 | null, no entry. The Realtime guide does not cover the Live route. |
Sample rotation#
The samples follow the newest model. When a realtime id that the guide used to name drops out of the samples, the row gets absent.serverTools: unavailable while its model page states no tools. Its stored ["mcp"] is kept and no model.updated is emitted. A test covers this by renaming the fixture's first model.
Failure handling#
The guide loads through tryDocs under its own cache key, and only when a realtime id is listed. If it fails, realtime rows are absent: serverTools unavailable and keep their stored tools. No existing cached shape changed, so DOCS_CACHE_VERSION stays where it is. openai-gpt5-guides.test.ts (#371) now also expects the unserved MCP guide in docsFailures.
Checks#
- Trimmed real fixture:
fixtures/openai-realtime-mcp.md.txt(2026-11-21). server-tools.test.tscovers four cases:- The parse reads both samples.
- Changed wording throws.
- Named ids get
mcpfrom the guide source, and an unnamed id gets no entry. - A failed guide makes the rows
unavailable.
pnpm run typecheck,pnpm run lint,pnpm run check. Vitest on theopenai*provider tests, server-tools, native-reasoning(-followup), classify, model-facts, source-silent-facts, and the poll-models and model-identity worker tests: all pass. No spec change.