Conversation
Update the image error-log contract for the extracted result leaf and verify credential redaction in persisted generation errors. Split media payload validation and video error formatting to stay within the complexity gate, with option-mapping regressions. Add the feature fragment missing from the original PR. The expanded regression run passes 142 tests. Scoped ESLint and complexity checks, changelog integrity, and direct open-sse typechecking also pass.
|
Pushed
The expanded thirteen-file regression run passed 142/142 tests. Scoped ESLint, the complexity configuration, direct open-sse TypeScript checking, changelog integrity, and the normal pre-commit gates also passed. The full lint command still fails on obsolete suppressions in the six untouched files noted in the PR description; a diagnostic pass found no remaining code errors. The old CI run also reports env/docs drift for |
Grok Build logins can already call these media endpoints, but OmniRoute only exposes their LLM routes. This adds image, video, TTS, and batch transcription through the existing
grok-cliOAuth connection pool.grok-cli/andgc/now resolve the four media models. Imagine uses the CLI proxy; TTS and STT useapi.x.ai. ExistingxaiAPI-key routes and bare Imagine model resolution stay unchanged. This does not register the separatexai-oauthprovider.Validation
Added
tests/unit/grok-oauth-media.test.tsand updatedtests/unit/video-xai-grok-imagine.test.ts. The new suite covers all four dispatch families, payloads and hosts, UTF-8, codec validation, API-key rejection, refresh deduplication and persisted rotation in an isolated SQLite database, sticky video polling, timeout normalization, and error redaction. The timeout regressions were reproduced with failing tests before their fixes.The final focused regression run passed 127/127 tests:
Also passed: direct
tsc --noEmit -p open-sse/tsconfig.json,npm run typecheck:core, provider consistency and assets, base-relative file-size checks, error-helper checks, the standard cycle gate, and each docs gate. On Windows the env/docs gate needed Git Bash as the child shell. The wider handlers/utils cycle scan reports the same five existing components on both the base and this branch; neither new helper nor the Grok adapter adds a cycle. Changed-file ESLint and the normal commit hooks passed without disabling hooks or using a stash.An isolated live bundle of these handlers returned HTTP 200 for all four operations using an existing Grok OAuth access token:
The live harness deliberately stubbed token refresh, usage logging, feature flags, and log-payload normalization to avoid changing production state. It tests real auth headers, payload translation, HTTP calls, and polling with a fresh token, not a deployed gateway or end-to-end account selection. Refresh and persistence were exercised separately against the real refresh service with a mocked upstream and a disposable database. The probe required verified quota headroom and a zero on-demand cap; reported on-demand usage stayed zero afterward. No API-key fallback, browser session, deployment, or production token refresh was used.
Remaining checks
Full
npm run lintstops on unused suppression entries in six untouched base files. Running it with--pass-on-unpruned-suppressionsexits zero; no suppressions were pruned or widened. The provider translate-path golden fails locally only on six Copilot User-Agent values changing fromlinuxtowin32; the affected provider code, test, and snapshot are unchanged from the base, and the snapshot was not regenerated. The stock open-sse typecheck launcher also fails on Windows withspawnSync npx.cmd EINVAL; the compiler itself passed via the direct command above.The base is
release/v3.8.52at228d72db. Its active-release validation was still running, and its multi-arch manifest publishing check had already failed before this PR; no open base-red tracking issue was found. Full-repository unit/Vitest suites, aggregate coverage, and the production build were not run locally. Those results remain unverified until CI/review; the focused tests and live smokes are not a claim that the full matrix is green.Media availability and billing remain upstream/account-dependent. This adds batch STT and TTS, not realtime voice, audio translation, or a guarantee of free usage.