MCPcopy
hub / github.com/huggingface/smolagents / test_load_model_openai_model

Function test_load_model_openai_model

tests/test_cli.py:16–23  ·  view source on GitHub ↗
(set_env_vars)

Source from the content-addressed store, hash-verified

14
15
16def test_load_model_openai_model(set_env_vars):
17 with patch("openai.OpenAI") as MockOpenAI:
18 model = load_model("OpenAIModel", "test_model_id")
19 assert isinstance(model, OpenAIModel)
20 assert model.model_id == "test_model_id"
21 assert MockOpenAI.call_count == 1
22 assert MockOpenAI.call_args.kwargs["base_url"] == "https://api.fireworks.ai/inference/v1"
23 assert MockOpenAI.call_args.kwargs["api_key"] == "test_fireworks_api_key"
24
25
26def test_load_model_litellm_model():

Callers

nothing calls this directly

Calls 1

load_modelFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…