Use Claude Code, Codex, VSCode, Pi, and OpenCode (and 6 other harnesses) for free (1.3B+ free tokens) from your terminal, app, IDE, or phone, and now from the browser with native browser sessions (multi-harness + multi-model) like OpenClaw (voice supported + ToS friendly)
Python
patch: accept thinking display updates (#1995)
Ali Khokhar5e375e485841
diff --git a/src/free_claude_code/core/anthropic/models.py b/src/free_claude_code/core/anthropic/models.pyindex 46df1379..a9444012 100644--- a/src/free_claude_code/core/anthropic/models.py+++ b/src/free_claude_code/core/anthropic/models.py@@ -111,7 +111,7 @@ class ThinkingConfig(BaseModel):enabled: bool | None = Truetype: str | None = Nonebudget_tokens: int | None = None- display: Literal["summarized", "omitted"] | None = None+ display: Literal["summarized", "omitted", "updates"] | None = Noneclass MessagesRequest(BaseModel):diff --git a/tests/api/test_openai_codex_compatibility.py b/tests/api/test_openai_codex_compatibility.pyindex 2d48f0ad..fdf0bebb 100644--- a/tests/api/test_openai_codex_compatibility.py+++ b/tests/api/test_openai_codex_compatibility.py@@ -88,7 +88,10 @@ def _openai_provider(@pytest.mark.asyncio-async def test_messages_accepts_current_claude_controls_for_openai_provider() -> None:[email protected]("display", ["summarized", "omitted", "updates"])+async def test_messages_accepts_current_claude_controls_for_openai_provider(+ display: str,+) -> None:upstream_requests: list[httpx2.Request] = []provider = _openai_provider(upstream_requests,@@ -105,7 +108,7 @@ async def test_messages_accepts_current_claude_controls_for_openai_provider() ->"max_tokens": 1024,"messages": [{"role": "user", "content": "hello"}],"metadata": {"user_id": "example-user"},- "thinking": {"type": "adaptive", "display": "omitted"},+ "thinking": {"type": "adaptive", "display": display},"context_management": {"edits": [{diff --git a/tests/providers/test_messages_request_policy.py b/tests/providers/test_messages_request_policy.pyindex fda7375b..276dd50d 100644--- a/tests/providers/test_messages_request_policy.py+++ b/tests/providers/test_messages_request_policy.py@@ -1,5 +1,7 @@"""Native controls stay metadata-driven and preserve exact caller budgets."""+from typing import Literal+import pytestfrom free_claude_code.core.anthropic.models import ThinkingConfig@@ -68,17 +70,20 @@ def test_adaptive_only_rejects_exact_budget_but_allows_off() -> None:assert options.thinking == {"type": "disabled"}-def test_explicit_native_mode_works_without_model_heuristics() -> None:[email protected]("display", ["summarized", "omitted", "updates"])+def test_explicit_native_mode_works_without_model_heuristics(+ display: Literal["summarized", "omitted", "updates"],+) -> None:options = resolve_messages_options(model="unfamiliar-name",max_tokens=4096,reasoning=ReasoningPolicy.on(budget_tokens=1536),- thinking=ThinkingConfig(type="enabled", budget_tokens=1536, display="omitted"),+ thinking=ThinkingConfig(type="enabled", budget_tokens=1536, display=display),)assert options.thinking == {"type": "enabled","budget_tokens": 1536,- "display": "omitted",+ "display": display,}options = resolve_messages_options(model="another-name",