Skip to content

Update OpenAI models and request schema - #8

Open
berkeokur wants to merge 1 commit into
PndaMan:mainfrom
berkeokur:codex/update-openai-models
Open

Update OpenAI models and request schema#8
berkeokur wants to merge 1 commit into
PndaMan:mainfrom
berkeokur:codex/update-openai-models

Conversation

@berkeokur

@berkeokur berkeokur commented Sep 8, 2026

Copy link
Copy Markdown

DISCLAIMER
The modified code has been generated using gpt-5.6-Sol

  • OpenAI picker now offers GPT‑5.6 Luna, Terra, Sol, and GPT‑6 Astra in in Settings.svelte (line 122)
  • Chat’s OpenAI shortcut and fallback now use Luna.
  • Modern OpenAI requests now:
    • omit unsupported temperature
    • use max_completion_tokens
    • use the developer instruction role

OCR requests also omit temperature for modern OpenAI models.
OpenRouter, Ollama, and custom-provider payloads remain unchanged.
Added focused payload tests in llm.rs:676

Summary by CodeRabbit

  • New Features

    • Added support for modern OpenAI reasoning models, including GPT-5, GPT-6, and o-series models.
    • Updated request handling to use the appropriate response settings for these newer models.
  • Updates

    • Replaced the default OpenAI fallback model with GPT-5.6 Luna.
    • Updated the in-chat model picker to include GPT-5.6 Luna.
    • Refreshed the curated OpenAI model list with newer GPT-5.6 and GPT-6 options.

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: b1e8ac3f-a6d5-4b7d-b7ed-fcb97ef87022

📥 Commits

Reviewing files that changed from the base of the PR and between 6d205c6 and 7386f2b.

📒 Files selected for processing (4)
  • src-tauri/src/commands.rs
  • src-tauri/src/llm.rs
  • src/components/ChatPanel.svelte
  • src/views/Settings.svelte

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The backend now supports modern OpenAI chat request fields and model detection. OpenAI fallback defaults and UI model lists now use newer GPT models. Tests cover modern, legacy, and non-OpenAI request shapes.

Changes

OpenAI model support

Layer / File(s) Summary
Modern request schema and validation
src-tauri/src/llm.rs
Modern OpenAI models use the developer role and max_completion_tokens without temperature. Legacy and non-OpenAI models retain system, temperature, and max_tokens. Tests cover all three request shapes.
Fallback model updates
src-tauri/src/llm.rs, src-tauri/src/commands.rs
The OpenAI fallback model and its OCR/vision documentation now use gpt-5.6-luna.
OpenAI model picker updates
src/components/ChatPanel.svelte, src/views/Settings.svelte
The chat fallback and settings model lists now include newer OpenAI models.

Priority: ⬇️ Low — Defer the OpenAI model and request-schema update because its scope is limited to provider payload handling, model options, fallback selection, and focused tests.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 7386f

Modern OpenAI models now use the updated instruction role and token field, while legacy and compatible-provider requests retain their prior payload formats. The fallback and picker models are aligned with the new OpenAI options, with no concrete current-head merge risk identified.

Suggested reviewers: pndaman, gerridolivier

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 70.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 2 files. (2 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes to OpenAI model options and request payload handling.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 70.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 2 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Some tools did not complete. Review the errors below.

🔧 Clippy (1.97.1)

Clippy execution timed out


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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