feat(providers): make the agent tool-call ceiling configurable - #7430
Merged
Conversation
MAX_TOOL_ITERATIONS is now read from an env var of the same name and defaults to 20, so self-hosted deployments can raise the agent tool loop without a custom build. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lm2sCA6iswCvNT33eNRrix
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lm2sCA6iswCvNT33eNRrix
Contributor
Greptile SummaryThe PR makes the agent tool-call iteration ceiling configurable for self-hosted deployments while preserving the existing default.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/providers/index.ts | Replaces the fixed provider iteration limit with a validated environment-derived value and a fallback of 20. |
| apps/sim/lib/core/config/env.ts | Registers MAX_TOOL_ITERATIONS as an optional server environment variable. |
| helm/sim/values.yaml | Adds a commented Helm envDefaults example that is supported by the chart’s generic environment rendering. |
| helm/sim/Chart.yaml | Advances the Helm chart patch version for the configuration addition. |
| apps/docs/content/docs/platform/self-hosting/environment-variables.mdx | Documents how self-hosters can raise the agent tool-call ceiling and notes the additional model-call cost. |
| apps/sim/.env.example | Adds the optional MAX_TOOL_ITERATIONS setting and its default to the example environment file. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
Config[MAX_TOOL_ITERATIONS environment variable] --> Parse[envNumber validation]
Parse -->|positive integer| Ceiling[Configured iteration ceiling]
Parse -->|unset or invalid| Default[Default ceiling: 20]
Ceiling --> Providers[Provider tool-call loops]
Default --> Providers
Reviews (2): Last reviewed commit: "chore(helm): bump chart version for the ..." | Re-trigger Greptile
Collaborator
Author
Collaborator
Author
|
@cubic-dev-ai review this PR |
Contributor
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Contributor
There was a problem hiding this comment.
1 issue found across 6 files
Confidence score: 3/5
- In
helm/sim/Chart.yaml, installs that omitimage.tagorimage.digestcontinue usingv0.8.18, so users will not receive the new configurable tool-call ceiling and behavior may differ from the chart’s intended release; updateappVersionto a published release.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="helm/sim/Chart.yaml">
<violation number="1" location="helm/sim/Chart.yaml:5">
P1: When users install this chart without setting `image.tag` or `image.digest`, the default image remains `v0.8.18`, so the new configurable tool-call ceiling is not available. Update `appVersion` to a published release tag containing this change before shipping the chart.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
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
MAX_TOOL_ITERATIONSnow reads from an env var of the same name, defaulting to 20 — no behavior change unless it is setenvNumber.env.example, the self-hosting env-var docs, and the Helm values fileType of Change
Testing
Tested manually.
bun run type-check,bun run lint, andbun run check:audits(45 audits) all pass.Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_01Lm2sCA6iswCvNT33eNRrix