@blockrun/clawrouter 0.9.4 → 0.9.5
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/README.md +15 -15
- package/dist/cli.js +6 -3
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -581,7 +581,12 @@ declare const blockrunProvider: ProviderPlugin;
|
|
|
581
581
|
declare const MODEL_ALIASES: Record<string, string>;
|
|
582
582
|
/**
|
|
583
583
|
* Resolve a model alias to its full model ID.
|
|
584
|
-
*
|
|
584
|
+
* Also strips "blockrun/" prefix for direct model paths.
|
|
585
|
+
* Examples:
|
|
586
|
+
* - "claude" -> "anthropic/claude-sonnet-4" (alias)
|
|
587
|
+
* - "blockrun/claude" -> "anthropic/claude-sonnet-4" (alias with prefix)
|
|
588
|
+
* - "blockrun/anthropic/claude-sonnet-4" -> "anthropic/claude-sonnet-4" (prefix stripped)
|
|
589
|
+
* - "openai/gpt-4o" -> "openai/gpt-4o" (unchanged)
|
|
585
590
|
*/
|
|
586
591
|
declare function resolveModelAlias(model: string): string;
|
|
587
592
|
type BlockRunModel = {
|
package/dist/index.js
CHANGED
|
@@ -37,6 +37,7 @@ function resolveModelAlias(model) {
|
|
|
37
37
|
const withoutPrefix = normalized.slice("blockrun/".length);
|
|
38
38
|
const resolvedWithoutPrefix = MODEL_ALIASES[withoutPrefix];
|
|
39
39
|
if (resolvedWithoutPrefix) return resolvedWithoutPrefix;
|
|
40
|
+
return withoutPrefix;
|
|
40
41
|
}
|
|
41
42
|
return model;
|
|
42
43
|
}
|
|
@@ -2111,9 +2112,11 @@ var RequestDeduplicator = class {
|
|
|
2111
2112
|
removeInflight(key) {
|
|
2112
2113
|
const entry = this.inflight.get(key);
|
|
2113
2114
|
if (entry) {
|
|
2114
|
-
const errorBody = Buffer.from(
|
|
2115
|
-
|
|
2116
|
-
|
|
2115
|
+
const errorBody = Buffer.from(
|
|
2116
|
+
JSON.stringify({
|
|
2117
|
+
error: { message: "Original request failed, please retry", type: "dedup_origin_failed" }
|
|
2118
|
+
})
|
|
2119
|
+
);
|
|
2117
2120
|
for (const resolve of entry.resolvers) {
|
|
2118
2121
|
resolve({
|
|
2119
2122
|
status: 503,
|