@agentfield/sdk 0.1.135-rc.3 → 0.1.135-rc.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2623,7 +2623,8 @@ declare class MediaRouter {
|
|
|
2623
2623
|
|
|
2624
2624
|
/**
|
|
2625
2625
|
* OpenRouter-backed MediaProvider implementation.
|
|
2626
|
-
* Supports video generation (async job), image generation, and audio generation
|
|
2626
|
+
* Supports video generation (async job), image generation, and audio generation
|
|
2627
|
+
* via SSE (which only carries pcm16 audio — see #584).
|
|
2627
2628
|
*/
|
|
2628
2629
|
|
|
2629
2630
|
interface OpenRouterMediaProviderOptions {
|
package/dist/index.js
CHANGED
|
@@ -8340,6 +8340,12 @@ var OpenRouterMediaProvider = class {
|
|
|
8340
8340
|
request
|
|
8341
8341
|
);
|
|
8342
8342
|
}
|
|
8343
|
+
if (requestedFormat !== "pcm16" && requestedFormat !== "wav") {
|
|
8344
|
+
throw new MediaProviderError(
|
|
8345
|
+
`Audio format "${requestedFormat}" is not available from model ${model}: OpenRouter delivers chat-completions audio only as pcm16 \u2014 request "pcm16", or "wav" for those same samples wrapped in a RIFF/WAVE container client-side`,
|
|
8346
|
+
{ provider: "openrouter", model }
|
|
8347
|
+
);
|
|
8348
|
+
}
|
|
8343
8349
|
const wireFormat = requestedFormat === "wav" ? "pcm16" : requestedFormat;
|
|
8344
8350
|
const messages = [{ role: "user", content: request.text }];
|
|
8345
8351
|
const body = {
|