Skip to content

Commit b3b51a5

Browse files
committed
Update langgraph_agent_service.py
1 parent b50bb42 commit b3b51a5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cx-agent-backend/src/infrastructure/adapters/langgraph_agent_service.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,14 @@ def _create_agent(self, agent_type: AgentType, model: str) -> any:
3939
"""Create agent with specific model."""
4040
from langchain_openai import ChatOpenAI
4141

42+
# Remove vendor prefix if present (format: vendor/model)
43+
processed_model = model.split("/", 1)[-1] if "/" in model else model
44+
4245
# Create LLM with the specified model
4346
llm = ChatOpenAI(
4447
api_key=self._llm_service.api_key,
4548
base_url=self._llm_service.base_url,
46-
model=model,
49+
model=processed_model,
4750
temperature=0.7,
4851
streaming=True,
4952
)

0 commit comments

Comments
 (0)