Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

fix(model-hub): keep Claude thinking display updates off for Hub launches (#2353)

Maxbd08908c192c
diff --git a/modules/agents/model_hub.py b/modules/agents/model_hub.py
index ccc77c08d..c03449670 100644
--- a/modules/agents/model_hub.py
+++ b/modules/agents/model_hub.py
@@ -406,6 +406,11 @@ def build_claude_hub_env(
# The Hub owns retry and failover. A stream error must not make the CLI
# replay the whole turn as a second, non-streaming request.
result["CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK"] = "1"
+ # The CLI drops ``thinking.display="updates"`` only after an HTTP 400
+ # whose message names it. A slow Hub resolution commits a 200 stream
+ # first, so a Source that rejects the value would fail the turn instead
+ # of the CLI retrying without it. Thinking and effort are unaffected.
+ result["CLAUDE_CODE_THINKING_DISPLAY_UPDATES"] = "0"
for key, value in _CLAUDE_HUB_TIMEOUT_DEFAULTS.items():
result.setdefault(key, value)
else:
diff --git a/tests/test_model_hub_injection.py b/tests/test_model_hub_injection.py
index 0e00414b7..ab4e81dad 100644
--- a/tests/test_model_hub_injection.py
+++ b/tests/test_model_hub_injection.py
@@ -137,6 +137,7 @@ def test_hub_launch_masks_inherited_claude_auth_and_injects_gateway():
assert env["ANTHROPIC_AUTH_TOKEN"] == launch.gateway_token
assert env["CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY"] == "1"
assert env["CLAUDE_CODE_MAX_RETRIES"] == "0"
+ assert env["CLAUDE_CODE_THINKING_DISPLAY_UPDATES"] == "0"
assert env["CLAUDE_CODE_MAX_CONTEXT_TOKENS"] == "999999"
assert env["CLAUDE_CODE_MAX_OUTPUT_TOKENS"] == "999999"
assert env["CLAUDE_CODE_OAUTH_TOKEN"] == ""
@@ -172,6 +173,21 @@ def test_claude_hub_settings_own_connection_after_native_and_sdk_env_merges():
assert settings["env"]["CLAUDE_CODE_MAX_RETRIES"] == "0"
+def test_claude_hub_launch_pins_thinking_display_updates_off_above_native_choice():
+ # The CLI drops display="updates" only on an HTTP 400 naming it; a Hub
+ # stream committed as 200 before the Source rejects it would fail the turn.
+ launch = hub_launch()
+ native = '{"env":{"CLAUDE_CODE_THINKING_DISPLAY_UPDATES":"1"}}'
+ settings = json.loads(claude_settings_for_launch(native, launch))
+ env = build_claude_hub_env({"CLAUDE_CODE_THINKING_DISPLAY_UPDATES": "1"}, launch)
+
+ assert settings["env"]["CLAUDE_CODE_THINKING_DISPLAY_UPDATES"] == "0"
+ assert env["CLAUDE_CODE_THINKING_DISPLAY_UPDATES"] == "0"
+ for channel in ("direct", "native_cli"):
+ other = hub_launch(channel=channel, gateway_base_url=None, gateway_token=None)
+ assert "CLAUDE_CODE_THINKING_DISPLAY_UPDATES" not in build_claude_hub_env({}, other)
+
+
@pytest.mark.parametrize("channel", [None, "direct", "native_cli"])
def test_claude_native_settings_are_unchanged_without_a_hub_launch(channel):
settings = '{"autoMemoryEnabled":false}'