mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-04-30 14:52:36 +00:00
fix: ensure proper model listings
This commit is contained in:
@@ -2416,6 +2416,9 @@ class LLM(BaseLLM):
|
|||||||
"gpt-4.1",
|
"gpt-4.1",
|
||||||
"claude-3",
|
"claude-3",
|
||||||
"claude-4",
|
"claude-4",
|
||||||
|
"claude-sonnet-4",
|
||||||
|
"claude-opus-4",
|
||||||
|
"claude-haiku-4",
|
||||||
"gemini",
|
"gemini",
|
||||||
)
|
)
|
||||||
model_lower = self.model.lower()
|
model_lower = self.model.lower()
|
||||||
|
|||||||
@@ -1597,7 +1597,14 @@ class AnthropicCompletion(BaseLLM):
|
|||||||
Returns:
|
Returns:
|
||||||
True if the model supports images and PDFs.
|
True if the model supports images and PDFs.
|
||||||
"""
|
"""
|
||||||
return "claude-3" in self.model.lower() or "claude-4" in self.model.lower()
|
model_lower = self.model.lower()
|
||||||
|
return (
|
||||||
|
"claude-3" in model_lower
|
||||||
|
or "claude-4" in model_lower
|
||||||
|
or "claude-sonnet-4" in model_lower
|
||||||
|
or "claude-opus-4" in model_lower
|
||||||
|
or "claude-haiku-4" in model_lower
|
||||||
|
)
|
||||||
|
|
||||||
def get_file_uploader(self) -> Any:
|
def get_file_uploader(self) -> Any:
|
||||||
"""Get an Anthropic file uploader using this LLM's clients.
|
"""Get an Anthropic file uploader using this LLM's clients.
|
||||||
|
|||||||
@@ -2079,12 +2079,18 @@ class BedrockCompletion(BaseLLM):
|
|||||||
model_lower = self.model.lower()
|
model_lower = self.model.lower()
|
||||||
vision_models = (
|
vision_models = (
|
||||||
"anthropic.claude-3",
|
"anthropic.claude-3",
|
||||||
|
"anthropic.claude-sonnet-4",
|
||||||
|
"anthropic.claude-opus-4",
|
||||||
|
"anthropic.claude-haiku-4",
|
||||||
"amazon.nova-lite",
|
"amazon.nova-lite",
|
||||||
"amazon.nova-pro",
|
"amazon.nova-pro",
|
||||||
"amazon.nova-premier",
|
"amazon.nova-premier",
|
||||||
"us.amazon.nova-lite",
|
"us.amazon.nova-lite",
|
||||||
"us.amazon.nova-pro",
|
"us.amazon.nova-pro",
|
||||||
"us.amazon.nova-premier",
|
"us.amazon.nova-premier",
|
||||||
|
"us.anthropic.claude-sonnet-4",
|
||||||
|
"us.anthropic.claude-opus-4",
|
||||||
|
"us.anthropic.claude-haiku-4",
|
||||||
)
|
)
|
||||||
return any(model_lower.startswith(m) for m in vision_models)
|
return any(model_lower.startswith(m) for m in vision_models)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user