fix: watsonx models in Agent Component#1151
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates FlowsService._update_component_fields() to map provider-specific component inputs (API keys and base URLs) to the correct Langflow global variable names, with a focus on fixing IBM watsonx model initialization in Agent/LLM components.
Changes:
- Adds explicit
api_keymappings for OpenAI, Anthropic, and WatsonX to their Langflow global variable names. - Separates Ollama URL field handling between
api_base(Embedding Model) andollama_base_url(Language Model), and moves WatsonX URL mapping tobase_url_ibm_watsonx.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| # Update provider-specific fields | ||
| # Update provider-specific fields using Langflow global variable names. | ||
| # "api_base" is the Ollama URL field on the Embedding Model component; | ||
| # "ollama_base_url" is the equivalent field on the Language Model / Agent component. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates the way provider-specific fields are mapped to global variable names for various AI providers in the
flows_service.pyfile. The main focus is on making the field mappings more explicit and consistent, especially for providers like Ollama, OpenAI, Anthropic, and WatsonX.Provider-specific field mapping improvements:
field_mappingsdictionary to include explicit mappings forapi_keyfields for OpenAI, WatsonX, and Anthropic, ensuring consistent handling of API keys across providers.api_base,ollama_base_url, andbase_url_ibm_watsonxto better reflect their usage in different components.Fixes: