fix(slackbotv2): forward reasoning efforts for custom-provider models - #1438
Open
badjer wants to merge 1 commit into
Open
fix(slackbotv2): forward reasoning efforts for custom-provider models#1438badjer wants to merge 1 commit into
badjer wants to merge 1 commit into
Conversation
reasoningForModel() validates a requested effort against a hardcoded table of known model ids and silently drops the request for any model it does not recognize. Deployments that point Codex at an OpenAI-compatible endpoint via a custom model_providers.* entry (as the production docs suggest with CODEX_MODEL/CODEX_MODEL_PROVIDER) use model names that table can never contain, so their users' explicit per-turn and per-channel reasoning selections are discarded without feedback and every turn runs at the deployment default. Unknown models are now validated against the canonical effort set (every effort any Codex model accepts) and forwarded; the provider remains the authority on what its models support and rejects unsupported efforts itself. Known models keep their exact per-model validation. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
badjer
force-pushed
the
slackbot-reasoning-custom-models
branch
from
August 21, 2026 19:45
838dacf to
54e69e6
Compare
badjer
marked this pull request as ready for review
August 21, 2026 19:46
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
reasoningForModel()inservices/slackbotv2/src/console-session-link.tsvalidates a requested reasoning effort against a hardcoded table of known Codex model ids, and returnsundefinedfor any model it does not recognize. Deployments that point Codex at an OpenAI-compatible endpoint through a custommodel_providers.*entry — the pattern supported since #1410 and described in the production docs withCODEX_MODEL/CODEX_MODEL_PROVIDER— necessarily use model names that table can never contain.The effect is that a user's explicit
-rsn high(and anySLACKBOTV2_CHANNEL_DEFAULTSreasoning entry) is silently discarded on such deployments: no error, no feedback, and every turn runs at the deployment default effort.Fix
Models absent from the per-model table are now validated against the canonical effort set (the union of every effort any Codex model accepts, including
minimalfor the Nanocodex mapping) and forwarded. The provider is the authority on what its own models support and rejects unsupported efforts itself — a visible upstream error is strictly better than a silently ignored request. Known models keep their exact per-model validation, including thegpt-5.6alias and dated-snapshot handling.This deliberately changes one documented expectation:
reasoningForModel('codex', 'gpt-5.3', 'high')previously returnedundefined(unknown-model-as-typo). A mistyped model fails the turn anyway with a model-not-found from the provider, so pre-rejecting its effort adds no safety — while the old behavior broke a real, docs-recommended configuration.Tests
minimal); non-canonical values (superduper, empty) still returnundefined; non-Codex harnesses unchanged.gpt-5.3expectation moved into the forward-through case per the rationale above.main; ran the CI-equivalent locally (pnpm install --frozen-lockfile, thenbun test testinservices/slackbotv2): 251 pass / 1 skip / 0 fail.check:typesfails identically on a cleanmaincheckout (fetch.preconnecttypings intest/slack-user.test.ts, untouched by this change, under Bun 1.3.x); CI does not gate slackbotv2 oncheck:types.🤖 Generated with Claude Code