Python
Docs: reflect the Responses/Chat-Completions provider split
Devika Verma0de0da16c4b5
diff --git a/coworker/providers/base.py b/coworker/providers/base.pyindex a5f263f6..5400a9e5 100644--- a/coworker/providers/base.py+++ b/coworker/providers/base.py@@ -1,8 +1,9 @@"""Provider-agnostic model access layer.The runtime never imports a provider SDK directly — it talks to a `ProviderClient`.-v1 ships `OpenAIProvider` (OpenAI SDK, `chat.completions` only); an `AISuiteProvider`-slots in later (P12) without touching the engine, since aisuite is OpenAI-API-shaped.+Implementations: `OpenAIResponsesProvider` (native OpenAI via `/v1/responses`),+`OpenAIProvider` (Chat Completions — the compat world), and the native+Anthropic/Gemini/Bedrock/Vertex providers, all selected by the registry/router."""from __future__ import annotationsdiff --git a/coworker/providers/openai_provider.py b/coworker/providers/openai_provider.pyindex 42edec85..63a20718 100644--- a/coworker/providers/openai_provider.py+++ b/coworker/providers/openai_provider.py@@ -1,7 +1,11 @@-"""OpenAI provider — the v1 model access implementation.--Uses the OpenAI Python SDK `chat.completions` API only (no Responses/Assistants), so-the later swap to aisuite (OpenAI-API-shaped) stays a near drop-in.+"""OpenAI Chat Completions provider — the compat workhorse.++Uses the OpenAI Python SDK `chat.completions` API only, which is what the entire+OpenAI-compatible world implements: the compat vendors (DeepSeek, Z AI, Kimi, …),+resellers, Ollama, custom endpoints (Azure OpenAI, vLLM), and the Bedrock/Vertex MaaS+paths. Native OpenAI models (the `openai` provider with no custom endpoint) route to+`openai_responses.OpenAIResponsesProvider` instead — Chat Completions rejects function+tools combined with reasoning on GPT-5.6+, so reasoning + tools needs `/v1/responses`."""from __future__ import annotations@@ -39,10 +43,12 @@ def resolve_api_key(secrets: Any = None) -> Optional[str]:# GPT-5.6 (2026-07) defaults reasoning_effort to "medium" server-side, and# /v1/chat/completions rejects function tools combined with any effort other than-# "none" ("use /v1/responses"). Until we grow a Responses API path, pin effort to-# none whenever tools ride along on these models — and when the API rejects a call-# with that exact complaint anyway (a future generation, an alias we didn't list),-# retry once at effort none so the user gets a working turn instead of a 400.+# "none" ("use /v1/responses"). Native OpenAI now routes to the Responses provider,+# but GPT-5.6 can still land here through a custom endpoint (Azure OpenAI serves the+# same wire), so keep pinning effort to none whenever tools ride along on these+# models — and when the API rejects a call with that exact complaint anyway (a future+# generation, an alias we didn't list), retry once at effort none so the user gets a+# working turn instead of a 400._EFFORT_ERROR = "function tools with reasoning_effort are not supported"