Skip to content

Commit 1bbd1ed

Browse files
committed
fix generic llm provider type, reduce config file search
1 parent 6f381fb commit 1bbd1ed

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

src/mcp_agent/config.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,16 @@ class GenericSettings(BaseModel):
149149
base_url: str | None = None
150150

151151
model_config = ConfigDict(extra="allow", arbitrary_types_allowed=True)
152-
152+
153153

154154
class OpenRouterSettings(BaseModel):
155155
"""
156156
Settings for using OpenRouter models via its OpenAI-compatible API.
157157
"""
158+
158159
api_key: str | None = None
159-
160-
base_url: str | None = None # Optional override, defaults handled in provider
160+
161+
base_url: str | None = None # Optional override, defaults handled in provider
161162

162163
model_config = ConfigDict(extra="allow", arbitrary_types_allowed=True)
163164

@@ -294,8 +295,6 @@ def find_config(cls) -> Path | None:
294295
while current_dir != current_dir.parent:
295296
for filename in [
296297
"fastagent.config.yaml",
297-
"mcp-agent.config.yaml",
298-
"mcp_agent.config.yaml",
299298
]:
300299
config_path = current_dir / filename
301300
if config_path.exists():
@@ -367,8 +366,6 @@ def deep_merge(base: dict, update: dict) -> dict:
367366
while current_dir != current_dir.parent and not found_secrets:
368367
for secrets_filename in [
369368
"fastagent.secrets.yaml",
370-
"mcp-agent.secrets.yaml",
371-
"mcp_agent.secrets.yaml",
372369
]:
373370
secrets_file = current_dir / secrets_filename
374371
if secrets_file.exists():

src/mcp_agent/llm/providers/augmented_llm_generic.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010

1111

1212
class GenericAugmentedLLM(OpenAIAugmentedLLM):
13-
def __init__(self, *args, provider=Provider.GENERIC, **kwargs) -> None:
14-
super().__init__(*args, **kwargs) # Properly pass args and kwargs to parent
13+
def __init__(self, *args, **kwargs) -> None:
14+
super().__init__(
15+
*args, provider=Provider.GENERIC, **kwargs
16+
) # Properly pass args and kwargs to parent
1517

1618
def _initialize_default_params(self, kwargs: dict) -> RequestParams:
1719
"""Initialize Generic parameters"""

0 commit comments

Comments
 (0)