Commit Graph

7 Commits

  • refactor(thinking): export thinking helpers
    Expose thinking/effort normalization helpers from the executor package
    so conversion tests use production code and stay aligned with runtime
    validation behavior.
  • fix(thinking): normalize effort mapping
    Route OpenAI reasoning effort through ThinkingEffortToBudget for Claude
    translators, preserve "minimal" when translating OpenAI Responses, and
    treat blank/unknown efforts as no-ops for Gemini thinking configs.
    
    Also map budget -1 to "auto" and expand cross-protocol thinking tests.
  • fix(thinking): centralize reasoning_effort mapping
    Move OpenAI `reasoning_effort` -> Gemini `thinkingConfig` budget logic into
    shared helpers used by Gemini, Gemini CLI, and antigravity translators.
    
    Normalize Claude thinking handling by preferring positive budgets, applying
    budget token normalization, and gating by model support.
    
    Always convert Gemini `thinkingBudget` back to OpenAI `reasoning_effort` to
    support allowCompat models, and update tests for normalization behavior.
  • fix(thinking): gate reasoning effort by model support
    Only map OpenAI reasoning effort to Claude thinking for models that support
    thinking and use budget tokens (not level-based thinking).
    
    Also add "xhigh" effort mapping and adjust minimal/low budgets, with new
    raw-payload conversion tests across protocols and models.
  • fix(thinking): map budgets to effort levels
    Ensure thinking settings translate correctly across providers:
    - Only apply reasoning_effort to level-based models and derive it from numeric
      budget suffixes when present
    - Strip effort string fields for budget-based models and skip Claude/Gemini
      budget resolution for level-based or unsupported models
    - Default Gemini include_thoughts when a nonzero budget override is set
    - Add cross-protocol conversion and budget range tests