Skip to content

Conversation

@ahmetgunduz
Copy link
Member

Addresses confusing behavior where TeamAgentFactory showed misleading
errors suggesting only TEAM_API_KEY was acceptable, when AIXPLAIN_API_KEY
should also work.

  • Created centralized validation functions in config.py (single source of truth)

  • Updated api_key_checker.py to use centralized logic

  • Updated v2/core.py to accept either API key

  • Fixed error messages to indicate both keys are acceptable

  • Users can now use either AIXPLAIN_API_KEY or TEAM_API_KEY

  • Clear, consistent error messages across SDK

  • Backward compatible, no breaking changes

Before: "TEAM_API_KEY has not been set properly" (misleading)
After: "Neither 'AIXPLAIN_API_KEY' nor 'TEAM_API_KEY' has been set. Please set either environment variable."

Addresses confusing behavior where TeamAgentFactory showed misleading
errors suggesting only TEAM_API_KEY was acceptable, when AIXPLAIN_API_KEY
should also work.

- Created centralized validation functions in config.py (single source of truth)
- Updated api_key_checker.py to use centralized logic
- Updated v2/core.py to accept either API key
- Fixed error messages to indicate both keys are acceptable

- Users can now use either AIXPLAIN_API_KEY or TEAM_API_KEY
- Clear, consistent error messages across SDK
- Backward compatible, no breaking changes

Before: "TEAM_API_KEY has not been set properly" (misleading)
After: "Neither 'AIXPLAIN_API_KEY' nor 'TEAM_API_KEY' has been set. Please set either environment variable."
@ahmetgunduz ahmetgunduz requested review from elsheikhams99, kadirpekel and xainaz and removed request for xainaz September 18, 2025 16:25
@ahmetgunduz ahmetgunduz merged commit ed6f766 into development Sep 19, 2025
@ahmetgunduz ahmetgunduz deleted the BUG-638-TeamAgentFactory-incorrectly-requires-TEAM_API_KEY branch September 19, 2025 10:23
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.

3 participants