fix(provider): disable thinking for internal helper requests#137
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9979aafa93
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
This PR moves request classification and request-kind metadata into a dedicated provider/routing module and uses that routing metadata to force thinking=disabled for recognized internal helper-style requests, reducing unnecessary reasoning overhead while preserving debug/diagnostics behavior.
Changes:
- Introduces
src/provider/routingto own request classification (RequestKind), log-line formatting, and theshouldForceThinkingNonepolicy. - Updates request preparation to compute
requestKindearlier and forcethinking.type = 'disabled'(and omitreasoning_effort) for internal helper request kinds. - Refactors existing debug/stream/tool-flow code to consume routing exports while keeping diagnostics/dumps intact.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/provider/tools/flow.ts | Switches RequestKind import source to routing while keeping tool-flow diagnostics logging unchanged. |
| src/provider/stream.ts | Moves formatRequestLogLine import from debug to routing. |
| src/provider/routing/index.ts | Adds a routing barrel export for classifier utilities and RequestKind. |
| src/provider/routing/classifier.ts | Expands request classification to include additional helper request kinds and adds shouldForceThinkingNone. |
| src/provider/request.ts | Forces thinking off for routed helper requests by setting thinking.type='disabled' and omitting reasoning_effort. |
| src/provider/index.ts | Moves provider-level request classification import from debug to routing. |
| src/provider/debug/index.ts | Removes classifier exports from debug (debug now focuses on diagnostics/dumps). |
| src/provider/debug/dump.ts | Updates classifier imports to come from routing while preserving dump output. |
| src/provider/debug/diagnostics.ts | Updates classifier/log formatting imports to come from routing while preserving diagnostics behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary:
Checks: