Skip to content

fix: expose max thinking level for reasoning models - #9

Open
damngamerz wants to merge 1 commit into
requestyai:mainfrom
damngamerz:ss/thinking-level-map
Open

fix: expose max thinking level for reasoning models#9
damngamerz wants to merge 1 commit into
requestyai:mainfrom
damngamerz:ss/thinking-level-map

Conversation

@damngamerz

Copy link
Copy Markdown

Summary

Expose the max thinking level for Requesty models in pi.

Right now, pi-requesty registers discovered models with reasoning: true but no thinkingLevelMap, so pi only shows min / low / med / high — never max — even for models that support it.

Fix

Map each reasoning-capable model with thinkingLevelMap: { max: "max" } (see discoverModels), and persist thinkingLevelMap in updateModelsJson so /requesty-models-sync keeps it.

Why this is safe for every reasoning model

Requesty's /models response carries no machine-readable level field (only supports_reasoning). However, max is a global Requesty-reasoning-effort value that Requesty normalizes per backend (see https://docs.requesty.ai/features/reasoning):

  • OpenAI → forwards "high"
  • Anthropic → converts to a token budget near max output tokens
  • Vertex / Gemini → converts to a token budget near max output tokens

It is never rejected for any model type (only xhigh is model-specific). pi sends the mapped value literally as reasoning_effort, so Requesty performs the normalization.

Changes

  • requesty.js: inline thinkingLevelMap: reasoning ? { max: "max" } : undefined in the discovery mapping; persist it in updateModelsJson.

Fixes #8

Advertise the extended `max` thinking level in pi for every
reasoning-capable Requesty model via thinkingLevelMap, and persist it so
/requesty-models-sync keeps it. `max` is a global Requesty effort value
normalized per backend (OpenAI -> high, Anthropic/Gemini -> token budget),
so it is safe across all models.

Fixes requestyai#8
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.

discovery drops thinkingLevelMap: max/xhigh thinking levels not exposed for supported models

1 participant