Submission checklist
Package (Required)
Feature Description
Feature request
It would be great if langchain-openrouter supported the OpenRouter Responses API in the same way that langchain-openai supports OpenAI's Responses API via use_responses_api=True.
Motivation
OpenRouter now exposes both:
- Chat Completions API
- Responses API
However, ChatOpenRouter currently only exposes the Chat Completions interface.
Many production agent systems would benefit from the Responses API, especially for long-context and multi-turn agent workflows.
Why this matters
For production ReAct / LangGraph agents, the Responses API provides several important capabilities:
Currently these features are available when using ChatOpenAI(use_responses_api=True), but not when using ChatOpenRouter.
Suggested API
Ideally the API could mirror langchain-openai:
from langchain_openrouter import ChatOpenRouter
llm = ChatOpenRouter(
model="openai/gpt-5.6-luna",
use_responses_api=True,
)
### Use Case
## Real-world use cases
Supporting the Responses API in `ChatOpenRouter` would benefit a wide range of production AI applications, including:
- Long-running customer support conversations
- Enterprise knowledge assistants
- ReAct and LangGraph agents
- Multi-agent systems
- Coding assistants
- Research assistants
- Document analysis workflows
- Autonomous task execution
- Multi-turn planning and reasoning
- Applications with large static system prompts
Many of these applications maintain lengthy conversations and rely on extensive, mostly static instructions, tool definitions, schemas, and examples. With the current Chat Completions API, this context often needs to be resent with every request.
Responses API support would enable applications to continue conversations using `previous_response_id` while taking advantage of OpenRouter's routing capabilities. This can help:
- Reduce the number of prompt tokens sent on each request.
- Lower latency for long-running conversations.
- Improve prompt cache utilization.
- Reduce API costs.
- Simplify conversation state management.
- Better support production-scale agentic workflows.
This would also provide feature parity with `ChatOpenAI(use_responses_api=True)`, allowing developers to use the same LangChain patterns regardless of whether they connect directly to OpenAI or through OpenRouter.
Proposed Solution
No response
Alternatives Considered
No response
Additional Context
No response
Submission checklist
Package (Required)
Feature Description
Feature request
It would be great if
langchain-openroutersupported the OpenRouter Responses API in the same way thatlangchain-openaisupports OpenAI's Responses API viause_responses_api=True.Motivation
OpenRouter now exposes both:
However,
ChatOpenRoutercurrently only exposes the Chat Completions interface.Many production agent systems would benefit from the Responses API, especially for long-context and multi-turn agent workflows.
Why this matters
For production ReAct / LangGraph agents, the Responses API provides several important capabilities:
previous_response_idBetter conversation state management
Improved prompt caching
Future compatibility
Currently these features are available when using
ChatOpenAI(use_responses_api=True), but not when usingChatOpenRouter.Suggested API
Ideally the API could mirror
langchain-openai:Proposed Solution
No response
Alternatives Considered
No response
Additional Context
No response