Repository navigation
Conversation
GPT-6 models (and gpt-5 / o-series) reject `temperature` with HTTP 400, so setting the model to gpt-6-luna broke both autocomplete and the connectivity test. Detect reasoning models by id (including OpenRouter's "openai/" prefix), drop `temperature` for them, and send the lowest `reasoning_effort` the family accepts so shell completions stay fast. Other OpenAI-compatible vendors are unaffected. Default the OpenAI and OpenRouter presets to gpt-6-luna. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Setting the OpenAI model to
gpt-6-lunacurrently fails: both autocomplete and the AI settings connectivity test get HTTP 400 because GPT-6 models (like gpt-5 and the o-series) are reasoning models that rejecttemperature.This PR makes gterm send the right parameters for those models:
OpenAIModelTraits(Sources/LLM/LLMProvider.swift) detects reasoning models by model id:o1/o3/o4,gpt-5*(except the non-reasoninggpt-5-chat-*),gpt-6*. It also understands OpenRouter'sopenai/prefix.ChatQueryomitstemperatureand sends the lowestreasoning_effortthe family accepts, so shell completions stay fast and don't burn reasoning tokens:gpt-6*,gpt-5.1+→nonegpt-5→minimallowProviderRequestFactory.bodymirrors this (max_completion_tokens+reasoning_effortinstead ofmax_tokens+temperature).gpt-4o-mini,gpt-4.1) are unchanged.gpt-6-luna/openai/gpt-6-luna(cheaper than gpt-4o-mini at $0.10 / $0.50 per 1M tokens). Existing saved profiles are not modified.gpt-6-luna still supports Chat Completions (model docs), so no migration to the Responses API is needed.
Possibly related: #38 (reasoning output showing up in autocomplete). With
reasoning_effort: none, OpenAI reasoning models should no longer produce reasoning text, but I haven't confirmed that this resolves the case in that issue.Verification
gtermTests: 112 tests pass, including the newOpenAIModelTraitsTests(model detection, effort selection, request body shape) and a preset default test.CODE_SIGNING_ALLOWED=NO) succeeds.🤖 Generated with Claude Code