ta
TanStack
OSS
ta
Pipelines
Nx runs
Insights
Compare tasks
Analytics
Sign in
Toggle Sidebar
ai
ai
Pipelines
fix(ai-byteplus): review follow-ups — header-case auth clobber, validated poll/response bodies, honoured timeout Three defects where a success path trusted a shape the package's own helpers document as unreliable, plus the coverage that would have caught them. - **Auth headers could be clobbered by casing.** `toHeaderRecord` lowercases names for the `Headers` form of `defaultHeaders`, so `authorization` and `Authorization` both survived the spread as distinct object keys; `fetch`'s `Headers` constructor *appends* rather than replaces, producing `"Bearer wrong, Bearer right"` and 401ing every request with what reads like a bad key — the exact failure the guard's comment claimed to prevent. Reserved names are now dropped case-insensitively on both hosts. - **A malformed video poll response polled forever.** `retrieveTask` cast the 200 body to a task, so an empty or non-JSON body (both documented `readJsonBody` outcomes) became `status: undefined`, which `mapStatus` mapped to `processing` — core then polled to `maxDuration` and threw a generic timeout with the real body discarded. The body is now validated, and an unrecognized status throws naming the value rather than claiming progress. Same cast fixed on the image success path. - **`timeout` was accepted and ignored.** `BytePlusArkConfig` extends the OpenAI `ClientOptions`, and a test asserted `maxRetries` survives, but the fetch-based adapters passed neither to `fetch`. `timeout` is now honoured everywhere via `AbortSignal`; `maxRetries` is documented as chat-path only. Also: keep Ark's code/message on 404s instead of collapsing them to "Job not found"; `describeTaskFailure` always returns a reason; surface unrecognized image `data[]` items and warn on partial group failures; accept a string-typed TTS `code`; distinguish an audio-less TTS success from an envelope error; warn rather than silently drop untimed ASR words/utterances and empty transcripts; make the image reference-count guard's unknown-model skip explicit rather than an accidental `count > undefined`. Tests: +33 (277 total), covering each of the above plus two gaps that ran nowhere — the reasoning `delta` round-trip through `StreamProcessor` (pinning the cross-package short-circuit this adapter depends on) and structured-output gating driven through `chat()` rather than asserted at the hook. Correct the `supportsCombinedToolsAndSchema` docstring, which described a code path `chat({ outputSchema })` cannot reach. Docs: record why `@volcengine/ark-runtime` is deliberately not a dependency; document why byteplus is excluded from the OpenRouter model sync (date-suffixed Ark ids aren't derivable from OpenRouter slugs); note the `size` template divergence when porting a Seedance call between the byteplus and fal adapters. Example: surface file-attach failures in the Seedance Studio instead of swallowing them, and fail loudly when the capability probe returns no resolution tiers rather than falling back to a hardcoded 720p.
nx run-many --targets=build --exclude=examples/**,testing/**
⌘K
fix(ai-byteplus): review follow-ups — header-case auth clobber, validated poll/response bodies, honoured timeout
Succeeded
in
1s
Started
Linux
4 CPU cores
Copy command
nx run-many --targets=build --exclude=examples/**,testing/**
1035
5ba6db5
GitHub
Open on GitHub
Tasks
Resource Usage
ta
TanStack
OSS