The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
docs(openai): move chat-to-responses flag docs to openai.md completions section
Sameer Kankute97091172a380
diff --git a/docs/my-website/docs/providers/openai.md b/docs/my-website/docs/providers/openai.mdindex 1f4a1687e8b..ce03642747c 100644--- a/docs/my-website/docs/providers/openai.md+++ b/docs/my-website/docs/providers/openai.md@@ -434,7 +434,56 @@ curl -X POST 'http://0.0.0.0:4000/chat/completions' \## Getting Reasoning Content in `/chat/completions`-GPT-5 models return reasoning content when called via the Responses API. You can call these models via the `/chat/completions` endpoint by using the `openai/responses/` prefix.+GPT-5 models return reasoning content when called via the Responses API. You can call these models via the `/chat/completions` endpoint in two ways:++**Option A — per-request prefix:** Use the `openai/responses/` model prefix.++**Option B — global flag (recommended):** Set `route_all_chat_openai_to_responses = True` to automatically route all OpenAI `/chat/completions` requests through the Responses API, no model prefix needed.++<Tabs>+<TabItem value="sdk-global" label="SDK - Global Flag">++```python+import litellm++litellm.route_all_chat_openai_to_responses = True++response = litellm.completion(+ model="gpt-5.4",+ messages=[{"role": "user", "content": "What is the capital of France?"}],+ reasoning_effort="low",+)+```++</TabItem>+<TabItem value="proxy-global" label="PROXY - Global Flag">++Set in your proxy config:+```yaml+litellm_settings:+ route_all_chat_openai_to_responses: true+```++Then call normally — no model prefix needed:+```bash+curl -X POST 'http://0.0.0.0:4000/chat/completions' \+-H 'Content-Type: application/json' \+-H 'Authorization: Bearer sk-1234' \+-d '{+ "model": "gpt-5.4",+ "messages": [{"role": "user", "content": "What is the capital of France?"}],+ "reasoning_effort": "low"+}'+```++</TabItem>+</Tabs>++:::note+`route_all_chat_openai_to_responses` only applies to the `openai` provider. Azure OpenAI is unaffected. You can also set it via env var: `LITELLM_ROUTE_ALL_CHAT_OPENAI_TO_RESPONSES=true`.+:::++**Option A — per-request prefix:** You can also prefix individual model names with `openai/responses/` to route just that call through the Responses API.<Tabs><TabItem value="sdk" label="SDK">diff --git a/docs/my-website/docs/providers/openai/responses_api.md b/docs/my-website/docs/providers/openai/responses_api.mdindex 31f21ba52a7..0d6b9013ac8 100644--- a/docs/my-website/docs/providers/openai/responses_api.md+++ b/docs/my-website/docs/providers/openai/responses_api.md@@ -923,45 +923,6 @@ curl http://localhost:4000/v1/chat/completions \</TabItem></Tabs>-### Route all OpenAI chat completions through the Responses API (recommended)--Instead of prefixing each model with `openai/responses/`, you can enable a global flag to automatically route **all** `/chat/completions` requests for OpenAI models through the Responses API bridge. This is the recommended approach for OpenAI models.--<Tabs>-<TabItem value="sdk" label="LiteLLM Python SDK">--```python showLineNumbers title="Global flag - route all OpenAI completions via Responses API"-import litellm--litellm.route_all_chat_openai_to_responses = True--response = litellm.completion(- model="gpt-4o",- messages=[{"role": "user", "content": "Hello!"}],-)-```--</TabItem>-<TabItem value="proxy" label="LiteLLM Proxy">--```yaml showLineNumbers title="proxy_config.yaml"-litellm_settings:- route_all_chat_openai_to_responses: true-```--Or set via environment variable:--```bash-LITELLM_ROUTE_ALL_CHAT_OPENAI_TO_RESPONSES=true-```--</TabItem>-</Tabs>--:::note-This flag only applies to the `openai` provider. Azure OpenAI and other providers are unaffected.-:::-## Free-form Function Calling<Tabs>