fix: handle GPT-5 Chat Completions with deterministic parameters - #736
Merged
Conversation
brovzar-lab
pushed a commit
to brovzar-lab/MiroFish-Lemon
that referenced
this pull request
Jul 28, 2026
Brings in: Zep memory cap for long runs (OOM fix, PR 666ghj#730), zep-cloud 3.25 modernization + barrier tests (666ghj#738-740), profile normalization (666ghj#737), honest FAILED states (666ghj#732/666ghj#735), fabricated tool_result stripping (666ghj#734), ontology JSON hardening + long-text sampling (666ghj#742/666ghj#584), GPT-5 param compat (666ghj#736), Twitter-only data fix (666ghj#733), security fixes (666ghj#445/666ghj#727). Conflict resolutions: - llm_client.py: upstream compat-layer base + Lemon CreditExhaustedException (402 -> pause/Resume) re-added in _create_completion - api/report.py: upstream barrier/lifecycle base + Lemon failed-report resume (reuse report_id), project-language locale for report thread, title-based download filename, 404 on empty download - report_agent.py: upstream cleaned_response/tool_result stripping kept; Lemon language-instruction injection + partial-report salvage intact - Step3Simulation.vue: upstream authoritative runner_status (drops Lemon platformsCompleted shortcut, superseded by the Zep ingestion barrier) 139 backend tests pass; vite build clean.
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
max_completion_tokensand omit unsupported temperature values for GPT-5-family modelsresponse_formatunless the caller explicitly omits itWhy
PR #498 correctly identified that unconditional legacy parameters can make GPT-5-family requests fail. Its adaptive retry removed parameters by matching provider error strings, which could mutate valid requests unpredictably and hide unrelated failures. It also removed supported parameters too broadly and carried unrelated lockfile churn.
The maintained version uses an explicit model-family mapping and keeps provider errors observable.
Validation
uv run pytest -q tests/test_openai_chat_compat.py— 9 passedgit diff --checkpassedNo paid OpenAI API request was made; the official parameter contract and mocked SDK boundary were used.
Preserves the original contributor commit and supersedes #498.
🤖 Sent by the MiroFish repository maintenance agent.