Repository navigation
feat: complete OpenAI-compatible web-provider contracts - #14103
Merged
diegosouzapw merged 7 commits intoOct 8, 2026
Merged
diegosouzapw merged 7 commits into
diegosouzapw merged 7 commits into
Conversation
diegosouzapw
changed the base branch from
release/v3.8.51
to
release/v3.8.52
September 29, 2026 11:24
Owner
|
Re-homed to |
Removes src/shared/contracts/openai.ts and its test — the module was never imported by any route/handler (verified via grep across open-sse/, src/, tests/), so it added maintenance surface with zero runtime effect. Fixes the two OPENAI_COMPATIBILITY.md doc-links that pointed at the removed test file to point at existing coverage instead (chat-completions-route-shape-gate.test.ts, audio-transcription-handler.test.ts, audio-speech-handler.test.ts). Also drops the src/app/api/v1/batches/route.ts sanitizeErrorMessage() hunk from this PR: it duplicates the same Hard Rule diegosouzapw#12 fix already proposed standalone in diegosouzapw#14115 and diegosouzapw#14145, so it is left for whichever of those lands first rather than triple-implemented here. The real fix in this PR — DSML tool-call normalization for DeepSeek-shaped web providers in webTools.ts/deepseekWebTools.ts — is unaffected and remains the mergeable core. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
…ratchet
Fixes a real regression this PR's own DSML changes introduced against the
pre-existing tests/unit/deepseek-web-tools-salvage-leading-json.test.ts
suite: parseFullWidthDsmlCalls() treated the mere presence of a stray/
corrupted "||DSML||" delimiter fragment (e.g. trailing garbage after an
otherwise well-formed <tool>{json} block with no actual <invoke name="...">
tag) as "recognized", short-circuiting parseDeepSeekToolCalls() before the
canonical tag parser's JSON-salvage fallback ever ran. It now only reports
recognized:true when a structurally well-formed invoke tag was found
(matching the "malformed or unknown native markers remain content"
contract for genuinely well-formed-but-unresolvable invokes).
Also splits the new parseNativeDeepSeekCalls/parseFullWidthDsmlCalls
functions (deepseekWebTools.ts) and resolveImageBaseUrl (imageGeneration.ts)
into smaller helpers to clear the complexity/cognitive-complexity ratchet
this PR's diff newly crossed (verified via
scripts/check/check-complexity-ratchets.mjs --base-ref
origin/release/v3.8.51, now 0/0 new violations) — no behavior change beyond
the recognized-flag fix above.
Corrects the changelog fragment: it used the wrong format for
check:changelog-integrity (prose + "Closes #N" lines instead of a "- "
bullet) and, per review, overclaimed a "canonical contract" this PR does
not ship — rewritten to describe only what is actually wired.
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
arashashrafii
force-pushed
the
fix/openai-compatible-web-provider-contract
branch
from
October 3, 2026 12:07
d7e43f7 to
61e871a
Compare
diegosouzapw
added a commit
to arashashrafii/OmniRoute
that referenced
this pull request
Oct 8, 2026
diegosouzapw#14103 landed on the base as a squash; the 7 inherited commits now merge to the base content, leaving only this PR's own commit as the delta. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
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
This PR completes the OpenAI-compatible contract layer with a focused implementation for web-cookie provider tool calling and parallel tool calls.
Included
/v1/realtimeis unsupported.Issue scope
Validation
tests/integration/batch-e2e-rate-limit.test.ts; the same test independently reproduced a pending promise/timeout and is not related to web-provider parsing.Architecture note
The architecture and implementation direction were informed by my prior independent WM Adapter project, especially its provider-neutral normalization boundary, strict provider-specific adapters, fail-closed parsing, and preservation of streaming tool-call state. WM Adapter is referenced as prior architectural inspiration only; this PR implements the behavior within OmniRoute’s existing contracts and abstractions.
Closes #14033
Closes #14034
Closes #14035
Closes #14036
Closes #14037