Skip to content

fix(agent): remove extra argument on tools call #2132

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sticky-note
Copy link

@sticky-note sticky-note commented Apr 14, 2025

Playing around with vLLM and mistral-7B with tools calls.
I needed this little diff, without it we get a ChatCompletionRequest Pydantic validation Error on the request object because of this:
https://github.com/mistralai/mistral-common/blob/f4a06998b75ed78bbf5aaf569590b772ea26c9f6/src/mistral_common/base.py#L9

Extra Arguments are never allowed when using Mistral SDK


Important

Removes extra name argument from tool dictionary in get_generation_config() in agent.py to fix Pydantic validation error with Mistral SDK.

  • Behavior:
    • Removes extra name argument from tool dictionary in get_generation_config() in agent.py to fix Pydantic validation error with Mistral SDK.

This description was created by Ellipsis for 0183371. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to 0183371 in 1 minute and 35 seconds

More details
  • Looked at 12 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. py/core/base/agent/agent.py:162
  • Draft comment:
    Removed extra 'name' key from the function call dict. Ensure that downstream logic is updated to not rely on this field. The removal aligns with Mistral SDK's restrictions on extra arguments.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50%
    The comment makes a speculative warning about downstream logic potentially relying on the removed field. This is exactly the kind of speculative "if X then Y might be an issue" comment we should avoid. The comment also asks the author to "ensure" something, which violates our rules. The actual change (removing redundant name field) seems straightforward and doesn't need explanation.
    The comment does provide context about Mistral SDK compatibility which could be useful information. Maybe this context helps other developers understand the change.
    While the Mistral SDK context is interesting, it's not actionable and the speculative warning about downstream effects violates our core rules about not making "ensure that..." or "if X then Y" type comments.
    Delete this comment as it is primarily speculative and asks the author to verify/ensure something, which violates our commenting rules.
2. py/core/base/agent/agent.py:162
  • Draft comment:
    Removing the extra 'name' key from each tool config is appropriate given Mistral SDK's Pydantic model doesn't allow extra arguments. Ensure that tool identification isn't needed elsewhere; if so, consider an alternative logging or metadata mechanism.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50%
    The comment is informative and suggests ensuring that tool identification isn't needed elsewhere. It doesn't provide a specific code suggestion or ask for a test to be written. It also doesn't point out a specific issue with the code. Therefore, it violates the rules.
3. py/core/base/agent/agent.py:96
  • Draft comment:
    There is a typographical error in the f-string on line 96. Consider changing 'Note,you only have ...' to 'Note, you only have ...' for improved readability.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.

Workflow ID: wflow_79hNvEBUe7Gjf83B


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant