chore: simplify platform integration token resolution#4545
Open
greysonlalonde wants to merge 2 commits intomainfrom
Open
chore: simplify platform integration token resolution#4545greysonlalonde wants to merge 2 commits intomainfrom
greysonlalonde wants to merge 2 commits intomainfrom
Conversation
57b2074 to
193eeee
Compare
Remove unused platform_context context manager and env var fallback from context module. Token resolves from context var or env var via default_factory on the tool field. Replace custom __init__ with model_validator and use sanitize_tool_name.
5b3cd56 to
ddcfffe
Compare
lucasgomide
requested changes
Feb 20, 2026
Contributor
lucasgomide
left a comment
There was a problem hiding this comment.
How are we supposed to configure the integration token now that env-var support is being removed in OSS?
You also drop the public_methods in favor of using the "private instance"; i'm not big fan of this approach
From your current PR state users now have to import _platform_integration_token and set the token in the main file.
If this change is intentional we should update the docs to make it clear. In my opinion, this is a breaking change and should be treated as such
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.
Summary
platform_contextcontext manager and env var fallback fromcrewai.contextdefault_factoryon the tool field__init__onCrewAIPlatformActionToolwithmodel_validatorsanitize_tool_nameinstead of naive.lower().replace(" ", "_")