Skip to content

fix(slackbotv2): forward reasoning efforts for custom-provider models - #1438

Open
badjer wants to merge 1 commit into
paradigmxyz:mainfrom
badjer:slackbot-reasoning-custom-models
Open

fix(slackbotv2): forward reasoning efforts for custom-provider models#1438
badjer wants to merge 1 commit into
paradigmxyz:mainfrom
badjer:slackbot-reasoning-custom-models

Conversation

@badjer

@badjer badjer commented Aug 20, 2026

Copy link
Copy Markdown

Problem

reasoningForModel() in services/slackbotv2/src/console-session-link.ts validates a requested reasoning effort against a hardcoded table of known Codex model ids, and returns undefined for any model it does not recognize. Deployments that point Codex at an OpenAI-compatible endpoint through a custom model_providers.* entry — the pattern supported since #1410 and described in the production docs with CODEX_MODEL / CODEX_MODEL_PROVIDER — necessarily use model names that table can never contain.

The effect is that a user's explicit -rsn high (and any SLACKBOTV2_CHANNEL_DEFAULTS reasoning 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 minimal for 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 the gpt-5.6 alias and dated-snapshot handling.

This deliberately changes one documented expectation: reasoningForModel('codex', 'gpt-5.3', 'high') previously returned undefined (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

  • New: unknown models forward every canonical effort (codex and nanocodex, including minimal); non-canonical values (superduper, empty) still return undefined; non-Codex harnesses unchanged.
  • Updated: the gpt-5.3 expectation moved into the forward-through case per the rationale above.
  • Rebased on current main; ran the CI-equivalent locally (pnpm install --frozen-lockfile, then bun test test in services/slackbotv2): 251 pass / 1 skip / 0 fail.
  • check:types fails identically on a clean main checkout (fetch.preconnect typings in test/slack-user.test.ts, untouched by this change, under Bun 1.3.x); CI does not gate slackbotv2 on check:types.

🤖 Generated with Claude Code

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
badjer force-pushed the slackbot-reasoning-custom-models branch from 838dacf to 54e69e6 Compare August 21, 2026 19:45
@badjer
badjer marked this pull request as ready for review August 21, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant