oira666_pi-limits-wait 0.4.3 → 0.4.4
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/package.json +1 -1
- package/src/index.ts +2 -2
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -636,7 +636,7 @@ type StreamSimpleFn = (
|
|
|
636
636
|
model: Model<Api>,
|
|
637
637
|
context: Context,
|
|
638
638
|
options?: SimpleStreamOptions,
|
|
639
|
-
) => AssistantMessageEventStream
|
|
639
|
+
) => AssistantMessageEventStream | Promise<AssistantMessageEventStream>;
|
|
640
640
|
|
|
641
641
|
export function __configureFallbackModelsForTests(
|
|
642
642
|
models: FallbackModel[],
|
|
@@ -712,7 +712,7 @@ export function streamWithLimitsRetry(
|
|
|
712
712
|
: builtinStreamSimpleByApi.get(attempt.model.api)
|
|
713
713
|
?? getApiProviders().find((provider) => provider.api === attempt.model.api)?.streamSimple;
|
|
714
714
|
if (!attemptDelegate) throw new Error(`No stream handler registered for API ${attempt.model.api}.`);
|
|
715
|
-
const inner = attemptDelegate(attempt.model, context, attemptOptions);
|
|
715
|
+
const inner = await attemptDelegate(attempt.model, context, attemptOptions);
|
|
716
716
|
for await (const event of inner) {
|
|
717
717
|
if (!committed) {
|
|
718
718
|
if (event.type === "error") {
|