File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77
88
99class ChatOpenRouter (ChatOpenAI ):
10+ model : str
11+
1012 def __init__ (
1113 self ,
1214 model : str , # Add model as a parameter if it's dynamic
@@ -21,5 +23,3 @@ def __init__(
2123 ** kwargs
2224 )
2325 self .model = model
24- self .openai_api_base = settings .BASE_URL_OPENROUTER
25- self .api_key = api_key
Original file line number Diff line number Diff line change @@ -11,8 +11,6 @@ class DummySettings:
1111 monkeypatch .setattr ("app.llm.client.settings" , DummySettings )
1212
1313 client = ChatOpenRouter (model = "test-model" )
14- assert client .api_key .get_secret_value () == "dummy-key"
15- assert client .openai_api_base == "https://dummy-url.com"
1614 assert client .model == "test-model"
1715
1816
@@ -25,7 +23,5 @@ class DummySettings:
2523
2624 monkeypatch .setattr ("app.llm.client.settings" , DummySettings )
2725
28- client = ChatOpenRouter (model = "test-model" , api_key = "override-key" )
29- assert client .api_key .get_secret_value () == "override-key"
30- assert client .openai_api_base == "https://dummy-url.com"
31- assert client .model == "test-model"
26+ client = ChatOpenRouter (model = "override-model" , api_key = "override-key" )
27+ assert client .model == "override-model"
You can’t perform that action at this time.
0 commit comments