Skip to content

Comments

chore: simplify platform integration token resolution#4545

Open
greysonlalonde wants to merge 2 commits intomainfrom
gl/refactor/platform-integration-token
Open

chore: simplify platform integration token resolution#4545
greysonlalonde wants to merge 2 commits intomainfrom
gl/refactor/platform-integration-token

Conversation

@greysonlalonde
Copy link
Contributor

Summary

  • Remove unused platform_context context manager and env var fallback from crewai.context
  • Token resolves from context var or env var via default_factory on the tool field
  • Replace custom __init__ on CrewAIPlatformActionTool with model_validator
  • Use sanitize_tool_name instead of naive .lower().replace(" ", "_")
  • Builder captures token at construction and passes it through to tools

@greysonlalonde greysonlalonde changed the title refactor: simplify platform integration token resolution chore: simplify platform integration token resolution Feb 20, 2026
@greysonlalonde greysonlalonde force-pushed the gl/refactor/platform-integration-token branch 2 times, most recently from 57b2074 to 193eeee Compare February 20, 2026 09:49
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.
@greysonlalonde greysonlalonde force-pushed the gl/refactor/platform-integration-token branch from 5b3cd56 to ddcfffe Compare February 20, 2026 10:02
Copy link
Contributor

@lucasgomide lucasgomide left a comment

Choose a reason for hiding this comment

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

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

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.

2 participants