Repository navigation
docs(integrations): describe the gateway's inferred conversation identity - #2834
Merged
hidb4ai merged 1 commit intoNov 27, 2026
Merged
Conversation
16 of 17 tasks
hidb4ai
approved these changes
Nov 26, 2026
hidb4ai
left a comment
Contributor
There was a problem hiding this comment.
Reviewed 2505cd7. The bilingual documentation update matches the gateway distinction between inferred preparation-replay identity and explicit capture/prefix identity. No blocking findings, new database tables, migrations, or interfaces. Documentation CI is green. Host execution and real-provider end-to-end acceptance were not performed for this docs-only change.
hireview001
approved these changes
Nov 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue or RFC does this PR close?
Part of #2250.
Rationale for this change
#2813 makes a combined gateway (
PC_GATEWAY_CORE_UDS) infer a conversation for a request that carries no conversation header.history_conversation_idingateway/crates/pc-gateway-app/src/ingress.rsderives an ID from the model, the instructions and the messages up to the first user message, when the request carries the full history: noprevious_response_idorconversation, and a non-empty first user message preceded only by system or developer messages. The ID is process-local (history:{route}:…, hashed with a per-process seed). A combined deployment now injects by default when it has either an explicit or an inferred ID. The inferred ID is used only for preparation replay; capture and prefix extraction still use the header identity (run_with_replay_identityinexecutor.rs).The LangChain, LangGraph, Deep Agents, Pydantic AI, OpenClaw and Dify guides still said that a combined deployment injects only into requests with
X-PowerContext-Conversation-ID, and the OpenClaw guide requiredPC_GATEWAY_INJECTION=onbecause OpenClaw sends no usable header. Both statements are wrong after #2813. The deploy-server guide already describes the new rule in "Gateway context injection".What changes are included in this PR?
Docs only, in
docs/enanddocs/zh.integrations/{langchain,langgraph,deepagents,pydantic-ai}.md: the conversation-header paragraph of each gateway section now says that, without the header, a combined deployment infers the conversation from the opening of the request, and why the host's requests qualify by default:ChatOpenAIsends the thread's full history on every call unlessuse_previous_response_id=True(LangChain, LangGraph, Deep Agents).openai_previous_response_idoropenai_conversation_idis set.mode: "fork"carries the parent's history and shares its inferred conversation.PC_GATEWAY_CORE_BASE) injects only withPC_GATEWAY_INJECTION=on.integrations/openclaw.md: the bullet that requiredPC_GATEWAY_INJECTION=onnow says that a combined deployment infers the conversation, because on a custom provider OpenClaw 2026.8.1 sends the session's full history opening with its system prompt and the first user message; that sessions with the same system prompt and first message share an inferred conversation; and that a standalone gateway still needsPC_GATEWAY_INJECTION=on. The warning against a fixedX-PowerContext-Conversation-IDin the provider'sheadersstays.integrations/dify.md: the injection sentence now gives the general rule: a combined deployment injects when it identifies the conversation from a recognized header or from the opening of a full-history request;PC_GATEWAY_INJECTION=onprepares an unidentified request on its own; a standalone gateway injects only with that setting.Each passage links "Gateway context injection" in
operate/deploy-server.mdinstead of restating it.Are there any user-facing changes?
Documentation only. No code, API, configuration default or persisted-format changes.
How was this change tested?
prek run --fileson the twelve changed files (offline).pnpm check:linksinwebsite/(offline install): links and anchors in 379 public pages and 671 repository files.history_conversation_id, the injection default and the skip log iningress.rs, andrun_with_replay_identityinexecutor.rs.ChatOpenAIrequest construction anduse_previous_response_id.instructions,openai_previous_response_idandopenai_conversation_id.tasktool's subagent message andmode: "fork"history.@openclaw/ai2026.8.1dist/transports.mjs(resolveResponsesContinuationRequestusesprevious_response_idonly for OpenAI's own Responses endpoint withstore: true) and the shared Responses mapping that sends the system prompt as the first message item.AI usage statement
This PR was prepared with Claude Code (Claude Opus 5.5): reading the gateway and host SDK sources, and writing the documentation text. A second Claude Code session reviewed the diff before the PR was opened.