Skip to content

fix: bug-fix batch round 5 (#2504, #2515, #2520) - #2535

Merged
diegosouzapw merged 5 commits into
release/v3.8.2from
fix/bugfix-batch-v3.8.2-r5
May 22, 2026
Merged

diegosouzapw merged 5 commits into
release/v3.8.2from
fix/bugfix-batch-v3.8.2-r5

Conversation

@diegosouzapw

Copy link
Copy Markdown
Owner

Summary

Round-5 bug-fix batch from /resolve-issues-cc — 3 fixes with tests.

Issue Fix
#2504 Gemini thinking models returned [400]: Function call is missing a thought_signature in functionCall parts on agentic tool use. The cached thoughtSignature (keyed by connection + tool-call id) wasn't being re-attached because FORMATS.GEMINI / FORMATS.GEMINI_CLI request translators didn't thread the signature namespace. Now they do.
#2515 PDFs were silently dropped depending on the content-part field name: input_file worked for Codex but not Gemini; file/document worked for Gemini but not Codex. Now input_file is accepted on the Gemini path and document (+ bare data/url) on the Responses/Codex path, so a PDF reaches the model regardless of which name the client used.
#2520 A reasoning-only stream (thinking arrays / reasoning_details, e.g. Mistral/StepFun with low max_tokens) was misclassified as "Stream ended before producing useful content" and turned into a spurious 502. hasUsefulValue now counts those carriers as valid output.

Tests

  • stream-readiness.test.ts (+1, 12 total), translator-openai-to-gemini.test.ts (+3, 23 total). All green; full unit suite green on pre-push.

Notes

…nt parts (#2515)

#2504: thread _signatureNamespace through the FORMATS.GEMINI and FORMATS.GEMINI_CLI
request translators so a cached Gemini thoughtSignature is re-attached to the
functionCall on the follow-up turn (was 400 'missing thought_signature').
#2515: accept input_file (Responses API) on the Gemini path and document (Gemini-style)
on the Responses/Codex path so PDFs reach the model regardless of content-part name.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@kilo-code-bot

kilo-code-bot Bot commented May 21, 2026

Copy link
Copy Markdown

Kilo Code Review could not run — your account is out of credits.

Add credits or switch to a free model to enable reviews on this change.

…destructive regen (#1622)

The CLI key bootstrap wrote to ~/.omniroute/.env ignoring DATA_DIR, so users with a
custom DATA_DIR (incl. Docker-style setups) lost the key across restarts. It also
regenerated a fresh key whenever STORAGE_ENCRYPTION_KEY was unset — even when an encrypted
storage.sqlite already existed — locking users out. Now writes to DATA_DIR and refuses to
auto-generate when a database is already present (mirrors server bootstrapEnv guard).
Reported by Daniel Nach; original key persistence by @Chewji9875.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e70b276b30

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +384 to +386
const file = toRecord(
contentItem.type === "document" ? contentItem.document : contentItem.file
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve top-level document/file payload fields when normalizing

This branch claims to normalize bare data/url payloads, but it only reads nested contentItem.document/contentItem.file. If a client sends type:"document" (or type:"file") with top-level data/url fields, the translator emits {type:"input_file"} without file_data/file_url, which then reaches Responses/Codex as an empty file part and can trigger request rejection or dropped document input.

Useful? React with 👍 / 👎.

Comment on lines 137 to +138
const mimeTypeFallback =
rec.mime_type ||
rec.media_type ||
file?.mime_type ||
doc?.mime_type ||
"application/octet-stream";
rec.mime_type || rec.media_type || file?.mime_type || doc?.mime_type || "application/pdf";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid defaulting unknown raw file MIME type to PDF

Changing the fallback MIME from a generic value to application/pdf means any raw base64 file without explicit mime_type (for example text/CSV/other binaries) is now mislabeled as PDF. Gemini will parse those bytes as a PDF payload, which can cause malformed-document errors or incorrect file handling for non-PDF uploads that previously used a neutral type.

Useful? React with 👍 / 👎.

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