Repository navigation
Conversation
This branch has not been deployed
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.
Problem
The default configuration for each of
BaseTool,BaseResource, andBasePromptis constructed once in the function signature. Instances that omitconfigtherefore share a mutable object: settingfirst.config.titleor.descriptionalso changes another instance's public name/description, including instances constructed later.Changes
Use a
Nonedefault and create a fresh base configuration per instance. Explicitly supplied configuration objects are retained by identity, so callers can still share a config deliberately. This changes two runtime lines in each base class; schemas and execution methods are unchanged.Add public-behavior regression coverage for all three component types, checking existing and subsequently constructed instances, plus explicit-config identity checks. The regression test restores the original values in teardown so it also runs safely on the unfixed implementation.
Validation
Python 3.12.14, dependencies from
uv sync:cbf3e3e: 3 failed, 3 passed, with all failures caused by another instance's metadata changing.env -u MINIMAX_API_KEY uv run pytest --cov=atomic_agents atomic-agents: 624 passed, 3 skipped; 1,875 of 1,884 statements covered (99.5%, rounded to 99% in the report). The three live MiniMax tests were skipped; no model requests were made.AI assistance: prepared and verified with Codex.