Skip to content

feat: add tool mode unsupported list for groq Models #7497

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

Merged
merged 8 commits into from
Apr 15, 2025

Conversation

edwinjosechittilappilly
Copy link
Collaborator

Tested curated list of latest models.
This pull request includes significant changes to the handling of GROQ models in the src/backend/base/langflow directory. The updates involve categorizing models into different groups, updating import statements, and modifying the logic to filter out unsupported models.

Categorization of GROQ models:

  • src/backend/base/langflow/base/models/groq_constants.py: The GROQ models are now categorized into GROQ_PRODUCTION_MODELS, GROQ_PREVIEW_MODELS, DEPRECATED_GROQ_MODELS, UNSUPPORTED_GROQ_MODELS, and TOOL_CALLING_UNSUPPORTED_GROQ_MODELS. This change helps in better organizing and managing the models.

Updates to import statements:

Filtering unsupported models:

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Apr 8, 2025
@dosubot dosubot bot added the enhancement New feature or request label Apr 8, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

@@ -94,7 +100,7 @@ def get_models(self, tool_model_enabled: bool | None = None) -> list[str]:
api_key=self.api_key,
base_url=self.base_url,
)
if not self.supports_tool_calling(model_with_tool):
if not self.supports_tool_calling(model_with_tool) or model in TOOL_CALLING_UNSUPPORTED_GROQ_MODELS:
Copy link
Preview

Copilot AI Apr 8, 2025

Choose a reason for hiding this comment

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

The variable 'model' is undefined in this condition and should likely be 'model_with_tool'. Update the variable to ensure the logic functions as intended.

Suggested change
if not self.supports_tool_calling(model_with_tool) or model in TOOL_CALLING_UNSUPPORTED_GROQ_MODELS:
if not self.supports_tool_calling(model_with_tool) or model_with_tool in TOOL_CALLING_UNSUPPORTED_GROQ_MODELS:

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Apr 8, 2025
@edwinjosechittilappilly edwinjosechittilappilly added the DO NOT MERGE Don't Merge this PR label Apr 8, 2025
@edwinjosechittilappilly edwinjosechittilappilly changed the base branch from main to tool-mode-updates April 8, 2025 13:51
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Apr 8, 2025
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Apr 8, 2025
Base automatically changed from tool-mode-updates to main April 8, 2025 17:05
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Apr 8, 2025
Copy link
Member

@Cristhianzl Cristhianzl left a comment

Choose a reason for hiding this comment

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

lgtm

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Apr 8, 2025
@edwinjosechittilappilly edwinjosechittilappilly removed the DO NOT MERGE Don't Merge this PR label Apr 8, 2025
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Apr 8, 2025
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Apr 8, 2025
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Apr 8, 2025
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Apr 14, 2025
@edwinjosechittilappilly edwinjosechittilappilly added this pull request to the merge queue Apr 15, 2025
Merged via the queue into main with commit d421de5 Apr 15, 2025
34 of 35 checks passed
@edwinjosechittilappilly edwinjosechittilappilly deleted the fix-agent-model-error-groq branch April 15, 2025 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants