Skip to content

Commit c7ce1d8

Browse files
committed
fix(agent): update OpenRouterAgent and primary adapter for chat model and URL scheme
- Added BaseChatModel import and chat_model typing in OpenRouterAgent - Ensure public_api_host starts with https:// in primary adapter - Updated uv.lock dependencies versions
1 parent 0120aa6 commit c7ce1d8

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

libs/naas-abi-cli/uv.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/naas-abi-marketplace/naas_abi_marketplace/applications/openrouter/agents/OpenRouterAgent.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
from typing import Optional
44

5+
from langchain_core.language_models import BaseChatModel
6+
7+
from naas_abi_core.models.Model import ChatModel
58
from naas_abi_core.services.agent.IntentAgent import (
69
AgentConfiguration,
710
AgentSharedState,
@@ -86,6 +89,7 @@ def New(
8689
if cls.MODEL_ID and "/" in cls.MODEL_ID
8790
else cls.MODEL_ID
8891
)
92+
chat_model: BaseChatModel | ChatModel
8993
if lookup_id in registry.list_canonical_ids():
9094
chat_model = registry.get_chat_model(lookup_id, provider="openrouter")
9195
else:

libs/naas-abi/naas_abi/apps/nexus/apps/api/app/services/agents/adapters/primary/agents__primary_adapter__FastAPI.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ def _public_modules_url(path: str) -> str:
218218
from naas_abi import ABIModule
219219

220220
public_api_host = ABIModule.get_instance().configuration.global_config.public_api_host
221+
if not public_api_host.startswith("https://"):
222+
public_api_host = f"https://{public_api_host}"
221223
return f"{public_api_host}/modules/{path.lstrip('/')}"
222224

223225

0 commit comments

Comments
 (0)