Skip to content

feat(agent): expose model budgets and deterministic tool limits - #4954

Merged
asim merged 1 commit into
masterfrom
codex/4937-agent-model-controls
Sep 21, 2026
Merged

asim merged 1 commit into
masterfrom
codex/4937-agent-model-controls

Conversation

@asim

@asim asim commented Sep 21, 2026

Copy link
Copy Markdown
Member

Agents cannot configure provider output budgets or cap advertised tools, causing provider rejections and empty responses.

Add MaxTokens, Effort, Temperature and MaxTools options plus root-package Agent helpers. Forward settings through generation, streaming and ephemeral delegation. Cap the combined tool set deterministically by name and log omitted tools. Groq/OpenAI send explicit temperature (including zero) and return model.ErrOutputLimit for length finishes with no visible output; preserve stop reasons for partial responses.

Validation: fake-provider tests cover Ask, StreamAsk, Stream and delegation; deterministic tool-limit tests cover capped/unlimited lists. Local HTTP tests cover request options, tool follow-ups and empty/partial output limits for both providers and streaming modes. Build and lint pass. Full suite runs in CI.

Closes #4937

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 21, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-21T07:18:00.557655Z 5968080 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@asim
asim merged commit b8df017 into master Sep 21, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] agent: no way to set max tokens, reasoning effort or a tool cap

1 participant