Skip to content

fix(pi): use model-specific GPT thinking levels - #506

Open
dgokeeffe wants to merge 1 commit into
databricks:mainfrom
dgokeeffe:fix/pi-gpt-thinking-levels
Open

fix(pi): use model-specific GPT thinking levels#506
dgokeeffe wants to merge 1 commit into
databricks:mainfrom
dgokeeffe:fix/pi-gpt-thinking-levels

Conversation

@dgokeeffe

@dgokeeffe dgokeeffe commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • declare model-specific GPT reasoning controls in Pi's custom OpenAI Responses entries
  • add complete GPT-6 Astra metadata: text/image input, 1,050,000-token context, and 128,000 max output
  • map Pi's off control to the Responses API's none value only where supported
  • suppress unsupported minimal, low, and off choices for newer and Pro variants
  • add regression coverage for Astra, GPT-5.4, GPT-5.5, GPT-5.6, Pro, and legacy GPT-5 models

Fixes #505

Model mappings

  • GPT-6 Astra: low, medium, high, xhigh, max
  • GPT-5.6: none, low, medium, high, xhigh, max
  • GPT-5.5 and GPT-5.4: none, low, medium, high, xhigh
  • GPT-5.4/5.5 Pro: medium, high, xhigh
  • legacy GPT-5: retain the existing compatible minimal, low, medium, high behaviour

Validation

  • uv run pytest tests/test_agent_pi.py — 52 passed
  • uv run ruff check src/ucode/agents/pi.py tests/test_agent_pi.py
  • uv run ruff format --check src/ tests/
  • git diff --check

The full suite ran with 2,177 passed and 37 skipped. Four unrelated environment-sensitive tests failed in Claude smart-routing PTY/socket and Claude user-agent e2e coverage; the Pi suite and formatting/lint checks passed.

@dgokeeffe
dgokeeffe force-pushed the fix/pi-gpt-thinking-levels branch from ed869b3 to 37786db Compare September 5, 2026 05:08
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.

Pi exposes unsupported GPT reasoning effort levels

1 participant