Draft
Conversation
This reverts commit d6fefd9.
This reverts commit 2aefdc7.
c0f44e2 to
3e9ab2e
Compare
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- normalize_intercepted_tools: avoid redundant model_dump -> model_validate round-trip for Tool objects already in the right type. Construct Tool directly for OpenAI-format dicts instead of going through _normalize_tool_defs. - Cache normalized tool_defs per rollout in state — agents send the same tool definitions on every request, so we only normalize once. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use aiolimiter.AsyncLimiter (token-bucket) in create_sandbox() via new sandbox_creation_rate_limit parameter (creations per minute). When set, create_sandbox() throttles to avoid burst-loading the sandbox API at high concurrency. Disabled by default (None). Exposed as a parameter in CliAgentEnv.__init__ for easy configuration from eval configs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The previous cache blindly reused the first normalized tool_defs without checking if the agent sent different definitions on subsequent requests. Key on len(intercept_tools) as a cheap invalidation check — a false miss just re-normalizes (idempotent), but avoids silently using stale defs when the tool set changes mid-rollout. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…opencode normalize_response - Rename sandbox_creation_rate_limit -> sandbox_creations_per_minute for clarity - Make normalize_response async in cli_agent_env base class - Comment out opencode_env normalize_response override (disabled for now) - Import reordering Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
54b2575 to
129779f
Compare
cd6c2f5 to
0db45e6
Compare
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.
Description
Type of Change
Testing
uv run pytestlocally.Checklist
Additional Notes