mekosotto commited on
Commit
5af70c3
·
1 Parent(s): 0b5f569

fix(agents/live): skip on NotFoundError (model availability churns on OpenRouter free-tier)

Browse files
tests/agents/test_orchestrator_live.py CHANGED
@@ -16,7 +16,7 @@ import os
16
  from pathlib import Path
17
 
18
  import pytest
19
- from openai import OpenAI
20
 
21
  from src.agents.orchestrator import Orchestrator
22
  from src.agents.prompts import ORCHESTRATOR_SYSTEM_PROMPT
@@ -65,7 +65,14 @@ class TestOrchestratorLive:
65
  model=os.environ.get("NEUROBRIDGE_AGENT_MODEL", _DEFAULT_MODEL),
66
  max_steps=5,
67
  )
68
- result = orch.run("CCO")
 
 
 
 
 
 
 
69
  # Soft assertions — model behavior varies but the workflow shape is fixed.
70
  assert result.finish_reason == "complete", f"got {result.finish_reason}, trace={result.trace}"
71
  tool_names = [t.name for t in result.trace]
 
16
  from pathlib import Path
17
 
18
  import pytest
19
+ from openai import NotFoundError, OpenAI
20
 
21
  from src.agents.orchestrator import Orchestrator
22
  from src.agents.prompts import ORCHESTRATOR_SYSTEM_PROMPT
 
65
  model=os.environ.get("NEUROBRIDGE_AGENT_MODEL", _DEFAULT_MODEL),
66
  max_steps=5,
67
  )
68
+ try:
69
+ result = orch.run("CCO")
70
+ except NotFoundError as e:
71
+ # Free-tier model availability churns on OpenRouter — a 404 here
72
+ # means the configured model isn't on this account, not that the
73
+ # orchestrator code is broken. Verify with `GET /diag/agent` and
74
+ # override via NEUROBRIDGE_AGENT_MODEL.
75
+ pytest.skip(f"agent model unavailable on OpenRouter: {e}")
76
  # Soft assertions — model behavior varies but the workflow shape is fixed.
77
  assert result.finish_reason == "complete", f"got {result.finish_reason}, trace={result.trace}"
78
  tool_names = [t.name for t in result.trace]