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.
Python agentagent-osaiai-agentsai-partnerchatopsclaudeclaude-codecodexdevtoolsdiscord-botlark-botllmlocal-firstlong-term-memoryopencodeslack-botvibe-codingvibeywechat
test(model-hub): cover omitted undeclared effort (#1726)
Max04955fcf65ed
diff --git a/docs/plans/model-hub.md b/docs/plans/model-hub.mdindex 9d3536381..1d55df978 100644--- a/docs/plans/model-hub.md+++ b/docs/plans/model-hub.md@@ -571,7 +571,7 @@ repairs or rewrites configuration.singleton local login; a `hub` hop uses the local Gateway and may be cross-vendor. Thesystem never prepends native supply or chooses a model. If the requested reasoningeffort exactly appears in the configured hop model's `reasoning_efforts`, pass that one-value; otherwise pass `null`, with no approximation or downgrade.+value; otherwise omit the effort field, with no approximation or downgrade.Parameter, protocol, and tool-compatibility failures are terminal without fallthrough.A local Gateway start, listener, or process loss at **any** request phase is terminaldiff --git a/tests/scenarios/model_hub/catalog.yaml b/tests/scenarios/model_hub/catalog.yamlindex 1ac63820c..be3b3d5f6 100644--- a/tests/scenarios/model_hub/catalog.yaml+++ b/tests/scenarios/model_hub/catalog.yaml@@ -409,6 +409,12 @@ scenarios:kind: authenticationlayer: scenariotest: tests/scenarios/model_hub/test_model_hub_turn_contract_scenarios.py::test_mh_static_credential_failure_does_not_retry_or_claim_takeover+ - id: MH-EFFORT-001+ name: An undeclared requested effort is omitted from the exact-hop request and the turn still completes+ status: covered+ kind: compatibility+ layer: scenario+ test: tests/scenarios/model_hub/test_model_hub_live_resolution_scenarios.py::test_mh_effort_001_undeclared_effort_is_omitted_and_turn_completes- id: MH-TURN-RESULT-001name: All terminal outcomes are closed schema-valid provenance productsstatus: covereddiff --git a/tests/scenarios/model_hub/test_model_hub_live_resolution_scenarios.py b/tests/scenarios/model_hub/test_model_hub_live_resolution_scenarios.pyindex fb78895f8..ada825274 100644--- a/tests/scenarios/model_hub/test_model_hub_live_resolution_scenarios.py+++ b/tests/scenarios/model_hub/test_model_hub_live_resolution_scenarios.py@@ -227,13 +227,19 @@ async def _post_turn(*,endpoint: str = "messages",stream: bool = False,+ payload: dict[str, object] | None = None,) -> tuple[int, bytes]:headers = {"Authorization": f"Bearer {launch.gateway_token}"}+ request_payload = payload or {+ "model": launch.runtime_model,+ "messages": [],+ "stream": stream,+ }async with aiohttp.ClientSession(trust_env=False) as client:async with client.post(f"{launch.gateway_base_url}/v1/{endpoint}",headers=headers,- json={"model": launch.runtime_model, "messages": [], "stream": stream},+ json=request_payload,) as response:return response.status, await response.read()@@ -495,6 +501,48 @@ def test_mh_res_live_003_started_stream_never_retries(tmp_path: Path) -> None:asyncio.run(exercise())+def test_mh_effort_001_undeclared_effort_is_omitted_and_turn_completes(+ tmp_path: Path,+) -> None:+ """MH-EFFORT-001: an undeclared effort is omitted from the exact-hop request and the turn still completes."""++ async def exercise() -> None:+ adapter = AdapterBoundaryFake(+ [AdapterResult(RawOutcomeKind.SUCCESS, status=200, body=b'{"ok":true}')]+ )+ source = _source("src_codex001")+ store = MemoryStore(_config(source))+ service = _service(+ tmp_path,+ store,+ adapter,+ now=lambda: datetime(2026, 8, 26, tzinfo=timezone.utc),+ )+ gateway = ModelHubTurnGateway(service)+ router = ModelHubRuntimeRouter(service=service, turn_gateway=gateway)+ try:+ launch = await router.resolve("codex", _requested_model("codex"))+ status, body = await _post_turn(+ launch,+ endpoint="responses",+ payload={+ "model": launch.runtime_model,+ "messages": [],+ "stream": False,+ "reasoning": {"effort": "low", "summary": "auto"},+ },+ )+ assert status == 200+ assert body == b'{"ok":true}'+ assert len(adapter.requests) == 1+ assert "reasoning_effort" not in adapter.requests[0]+ assert adapter.requests[0]["reasoning"] == {"summary": "auto"}+ finally:+ await gateway.close()++ asyncio.run(exercise())++def test_turn_gateway_nonstream_buffer_surfaces_terminal_failure(tmp_path: Path,) -> None: