-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
raise error: instead of defaulting any model #2100
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good to me.
But this is a breaking change as it will break a few already working Agents.
I think we should release it in a minor or major release.
) | ||
exit(1) | ||
self.model = OpenAIChat(id="gpt-4o") | ||
logger.error( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could probably make the model
parameter of the class as required instead of Optional.
Also this will break tons of code which do not provide model when creating Agent (like most of the examples in cookbook/tools section)
I think we should create a discussion in the Issues to talk about it. Also, if it is merged, it should be released in the next major patch as it is a breaking change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could take that approach, but for now, I believe it's one possible solution. A framework shouldn't enforce OpenAI's model as the default option. Instead, it should either require users to explicitly define a model or offer a more flexible default configuration.
we can have fruitful discussion on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True that, we should not have default pointing to a single vendor.
We can probably have a default config where we can define the default model behaviour. Like whether to raise an error in case the model is not provided or use a default model (which can be configured there). That will give lots of flexibility to the users of Agno. Something like a .agno_config file or similar.
Again, would be good to discuss this further.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if we do that, there’s no point in having these kinds of updates if you still need to configure it. We can include the model in every agent, and we won’t face these issues. My point is that we shouldn’t default to any single vendor. Instead, we can raise an error if the model isn’t provided. After making this change, we’ll only need to make small adjustments across the codebase, and it won’t take much time.
Description
Summary of changes: Removed automatic fallback to OpenAI model and enforced explicit model specification
Related issues: fixes
Motivation and context: Given that Agno is designed to support multiple models, forcing OpenAI as the default model is not ideal.
Environment or dependencies: Removes implicit requirement for
openai
packageImpact on metrics: N/A (configuration change rather than model performance change)
Fixes # (issue)
Type of change
Please check the options that are relevant:
Checklist
./scripts/format.sh
and./scripts/validate.sh
to ensure code is formatted and linted.Additional Notes
Include any deployment notes, performance implications, security considerations, or other relevant information (e.g., screenshots or logs if applicable).