fix: use auto function calling for together models (#2097)
This commit is contained in:
@@ -93,6 +93,8 @@ def requires_auto_tool_choice(llm_config: LLMConfig) -> bool:
|
||||
|
||||
if "nebius.com" in llm_config.model_endpoint:
|
||||
return True
|
||||
if "together.ai" in llm_config.model_endpoint or "together.xyz" in llm_config.model_endpoint:
|
||||
return True
|
||||
# proxy also has this issue (FIXME check)
|
||||
elif llm_config.model_endpoint == LETTA_MODEL_ENDPOINT:
|
||||
return True
|
||||
|
||||
@@ -222,17 +222,6 @@ class OpenAIProvider(Provider):
|
||||
# }
|
||||
if "config" not in model:
|
||||
continue
|
||||
if "chat_template" not in model["config"]:
|
||||
continue
|
||||
if model["config"]["chat_template"] is None:
|
||||
continue
|
||||
if model["config"]["chat_template"] is not None and "tools" not in model["config"]["chat_template"]:
|
||||
# NOTE: this is a hack to filter out models that don't support tool calling
|
||||
continue
|
||||
if "tools" not in model["config"]["chat_template"]:
|
||||
continue
|
||||
# if "config" in data and "chat_template" in data["config"] and "tools" not in data["config"]["chat_template"]:
|
||||
# continue
|
||||
|
||||
if "nebius.com" in self.base_url:
|
||||
# Nebius includes the type, which we can use to filter for text models
|
||||
|
||||
Reference in New Issue
Block a user