@@ -505,7 +505,7 @@ def _fake_get(url, *, headers=None, timeout=None, verify=None):
505505 assert captured ["url" ] == "https://api.fireworks.ai/v1/accounts/my-account-id/models"
506506
507507
508- def test_models_url_account_id_missing_skips_fetch (monkeypatch , tmp_path , capsys ):
508+ def test_models_url_account_id_missing_removes_account_path (monkeypatch , tmp_path ):
509509 config = {
510510 "fireworks_ai" : {
511511 "api_base" : "https://api.fireworks.ai/inference/v1" ,
@@ -519,10 +519,23 @@ def test_models_url_account_id_missing_skips_fetch(monkeypatch, tmp_path, capsys
519519 manager = _make_manager (tmp_path , config )
520520 monkeypatch .delenv ("FIREWORKS_AI_ACCOUNT_ID" , raising = False )
521521
522- assert manager ._fetch_provider_models ("fireworks_ai" ) is None
522+ captured = {}
523+
524+ def _fake_get (url , * , headers = None , timeout = None , verify = None ):
525+ captured ["url" ] = url
526+ captured ["headers" ] = headers
527+ captured ["timeout" ] = timeout
528+ captured ["verify" ] = verify
529+ return DummyResponse ({"data" : []})
530+
531+ monkeypatch .setattr ("requests.get" , _fake_get )
532+
533+ result = manager ._fetch_provider_models ("fireworks_ai" )
523534
524- captured = capsys .readouterr ()
525- assert "account_id_env not set" in captured .out
535+ # Should return the payload, not None
536+ assert result == {"data" : []}
537+ # URL should have /accounts/{account_id} removed
538+ assert captured ["url" ] == "https://api.fireworks.ai/v1/models"
526539
527540
528541def test_models_url_without_placeholder_unchanged (monkeypatch , tmp_path ):
0 commit comments