@cat-factory/agents 0.146.6 → 0.147.0
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/agents/kinds/bug-investigator.d.ts.map +1 -1
- package/dist/agents/kinds/bug-investigator.js +7 -3
- package/dist/agents/kinds/bug-investigator.js.map +1 -1
- package/dist/agents/kinds/traits.d.ts +22 -0
- package/dist/agents/kinds/traits.d.ts.map +1 -1
- package/dist/agents/kinds/traits.js +38 -3
- package/dist/agents/kinds/traits.js.map +1 -1
- package/dist/foundationalServices/FoundationalServiceCatalogService.js +1 -0
- package/dist/foundationalServices/FoundationalServiceCatalogService.js.map +1 -1
- package/dist/foundationalServices/ServiceCatalogSyncService.d.ts +77 -0
- package/dist/foundationalServices/ServiceCatalogSyncService.d.ts.map +1 -0
- package/dist/foundationalServices/ServiceCatalogSyncService.js +384 -0
- package/dist/foundationalServices/ServiceCatalogSyncService.js.map +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/providers/endpoints.d.ts +60 -0
- package/dist/providers/endpoints.d.ts.map +1 -1
- package/dist/providers/endpoints.js +39 -0
- package/dist/providers/endpoints.js.map +1 -1
- package/dist/providers/gateway-attribution.d.ts +74 -0
- package/dist/providers/gateway-attribution.d.ts.map +1 -0
- package/dist/providers/gateway-attribution.js +120 -0
- package/dist/providers/gateway-attribution.js.map +1 -0
- package/dist/providers/index.d.ts +3 -2
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js +3 -2
- package/dist/providers/index.js.map +1 -1
- package/dist/providers/instrumented.d.ts.map +1 -1
- package/dist/providers/instrumented.js +19 -0
- package/dist/providers/instrumented.js.map +1 -1
- package/dist/providers/resolvers.d.ts +79 -0
- package/dist/providers/resolvers.d.ts.map +1 -1
- package/dist/providers/resolvers.js +91 -8
- package/dist/providers/resolvers.js.map +1 -1
- package/package.json +6 -5
|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M9E,CAAA;AAEH;;;;;;;;;;GAUG;AACH,MAAM,MAAM,cAAc,GAAG,wBAAwB,GAAG,WAAW,CAAA;AAEnE;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,EAAE,SAAS,cAAc,EAE9D,CAAA;AAER,uGAAuG;AACvG,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,IAAI,cAAc,CAE7E;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAClC,MAAM,GAAG,SAAS,CAMpB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAI3F;AAYD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAI7D"}
|
|
@@ -29,6 +29,45 @@ export const XAI_BASE_URL = 'https://api.x.ai/v1';
|
|
|
29
29
|
// OpenRouter is a single OpenAI-compatible gateway to 300+ models, hosted by OpenRouter
|
|
30
30
|
// itself, so it has a public endpoint to default to.
|
|
31
31
|
export const OPENROUTER_BASE_URL = 'https://openrouter.ai/api/v1';
|
|
32
|
+
/** The routing this platform applies when a deployment says nothing: strict on both axes. */
|
|
33
|
+
export const DEFAULT_OPENROUTER_ROUTING = {
|
|
34
|
+
dataCollection: 'deny',
|
|
35
|
+
requireParameters: true,
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Read `OPENROUTER_DATA_COLLECTION` into the routing policy OpenRouter is given.
|
|
39
|
+
*
|
|
40
|
+
* OpenRouter's own default is `allow`, and this platform's is not, which is why the value is
|
|
41
|
+
* parsed rather than passed through: an agent prompt carries the customer's checkout, so
|
|
42
|
+
* routing it to a prompt-retaining upstream is a decision an operator makes on the record.
|
|
43
|
+
*
|
|
44
|
+
* Only the exact string `allow` opts in. A typo, a `true`, a `yes` and an empty override all
|
|
45
|
+
* stay denied, because the direction a misread must fail in is the private one. Shared by both
|
|
46
|
+
* facades so a deployment cannot be permissive on one and strict on the other.
|
|
47
|
+
*/
|
|
48
|
+
export function openRouterDataCollectionFrom(value) {
|
|
49
|
+
return value?.trim().toLowerCase() === 'allow' ? 'allow' : 'deny';
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Read `OPENROUTER_REQUIRE_PARAMETERS` into the routing policy.
|
|
53
|
+
*
|
|
54
|
+
* The mirror image of {@link openRouterDataCollectionFrom}: only the exact string `false` opts
|
|
55
|
+
* OUT, so a typo keeps the strict default. The two fail in opposite directions on purpose,
|
|
56
|
+
* because each default is the safe end of its own axis (private, and shape-honest).
|
|
57
|
+
*/
|
|
58
|
+
export function openRouterRequireParametersFrom(value) {
|
|
59
|
+
return value?.trim().toLowerCase() !== 'false';
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Read both routing knobs out of a deployment's environment. ONE reader, so a facade cannot
|
|
63
|
+
* wire one axis and forget the other, and both facades read the same two names.
|
|
64
|
+
*/
|
|
65
|
+
export function openRouterRoutingFrom(env) {
|
|
66
|
+
return {
|
|
67
|
+
dataCollection: openRouterDataCollectionFrom(env.OPENROUTER_DATA_COLLECTION),
|
|
68
|
+
requireParameters: openRouterRequireParametersFrom(env.OPENROUTER_REQUIRE_PARAMETERS),
|
|
69
|
+
};
|
|
70
|
+
}
|
|
32
71
|
/**
|
|
33
72
|
* Every provider reached over the shared OpenAI-compatible `/chat/completions` path, mapped
|
|
34
73
|
* to the endpoint it defaults to. `null` marks an **operator-hosted** gateway (Bifrost,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoints.js","sourceRoot":"","sources":["../../src/providers/endpoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE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jB,CAAC,CAAC,wCAAwC,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,OAAO,gBAAgB;QACxF,CAAC,CAAC,iDAAiD,IAAI,CAAC,SAAS,QAAQ,CAAA;AAC7E,CAAC;AACD,gGAAgG;AAChG,+FAA+F;AAC/F,mGAAmG;AACnG,4EAA4E;AAC5E,mGAAmG;AACnG,gGAAgG;AAChG,yFAAyF;AACzF,4FAA4F;AAC5F,8FAA8F;AAC9F,uFAAuF;AAEvF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,mBAAmB,CAAC,QAAgB;IAClD,OAAO,CACL,QAAQ,KAAK,YAAY,IAAI,0BAA0B,CAAC,QAAQ,CAAC,IAAI,aAAa,CAAC,QAAQ,CAAC,CAC7F,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { type OpenRouterRouting } from './endpoints.js';
|
|
2
|
+
/** The gateway's own account of one call: its ledger cost and the upstream it routed to. */
|
|
3
|
+
export interface GatewayCallReport {
|
|
4
|
+
/**
|
|
5
|
+
* What the gateway charged, in USD, when it says. Absent means NOT REPORTED, which is a
|
|
6
|
+
* different fact from a reported 0 (a genuinely free route) and must stay so: a reader takes
|
|
7
|
+
* the derived estimate for the first and the exact figure for the second.
|
|
8
|
+
*/
|
|
9
|
+
cost?: number;
|
|
10
|
+
/** The upstream that served the call (`anthropic`, `deepinfra`, …), when the gateway names it. */
|
|
11
|
+
upstream?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Whether `provider` is a gateway this platform asks for usage accounting.
|
|
15
|
+
*
|
|
16
|
+
* Only OpenRouter today. The operator-hosted gateways (`bifrost`, `litellm`) speak plain
|
|
17
|
+
* OpenAI-compatible and publish no such fields, so asking them would put an unknown key in the
|
|
18
|
+
* body of a strict endpoint for nothing.
|
|
19
|
+
*/
|
|
20
|
+
export declare function reportsGatewayAttribution(provider: string): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* The extra OpenAI Chat Completions body fields that turn a gateway's reporting on and state the
|
|
23
|
+
* deployment's routing policy, for the CONTAINER path. Empty for every provider that has none, so
|
|
24
|
+
* the proxy can merge it unconditionally (the shape `promptCacheParams` already established).
|
|
25
|
+
*
|
|
26
|
+
* Both members of {@link OpenRouterRouting} narrow the upstream pool, so both are the
|
|
27
|
+
* deployment's to set rather than constants here; see that type for what each buys and costs, and
|
|
28
|
+
* {@link gatewayRoutingRefusal} for what a caller says when the narrowing empties the pool.
|
|
29
|
+
*/
|
|
30
|
+
export declare function gatewayRequestParams(provider: string, routing?: OpenRouterRouting): Record<string, unknown>;
|
|
31
|
+
/**
|
|
32
|
+
* Name the routing constraint that can have caused a gateway's refusal, or undefined when this
|
|
33
|
+
* failure is not one of ours to explain.
|
|
34
|
+
*
|
|
35
|
+
* Why it exists: the two constraints above are the only reason a model that resolves for everyone
|
|
36
|
+
* else fails for one deployment, and the gateway's own 404 says only that no provider was
|
|
37
|
+
* allowed. It cannot know WHICH allow-list did the excluding, because the platform's request is
|
|
38
|
+
* the only place both are stated. Left unexplained, the operator sees a run fail with an opaque
|
|
39
|
+
* upstream error and nothing anywhere connects it to a variable they set (or, worse, never set:
|
|
40
|
+
* `deny` is stricter than the vendor's own default, so the deployment that hits this hardest is
|
|
41
|
+
* the one that configured nothing).
|
|
42
|
+
*
|
|
43
|
+
* Only the constraints actually IN FORCE are named, so relaxing what it names is always a step
|
|
44
|
+
* forward; when neither is on, the refusal is the gateway's own and this answers undefined
|
|
45
|
+
* rather than sending the operator after a setting that changed nothing.
|
|
46
|
+
*/
|
|
47
|
+
export declare function gatewayRoutingRefusal(opts: {
|
|
48
|
+
provider: string;
|
|
49
|
+
status: number;
|
|
50
|
+
body: string;
|
|
51
|
+
routing: OpenRouterRouting;
|
|
52
|
+
}): string | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Read the report off a raw OpenAI-shaped completion (or the final streamed chunk): the
|
|
55
|
+
* CONTAINER path's reader.
|
|
56
|
+
*
|
|
57
|
+
* OpenRouter puts the ledger cost on `usage.cost` and the upstream's name at the top level as
|
|
58
|
+
* `provider`. Both are read defensively and independently: a gateway that garbles one must not
|
|
59
|
+
* cost us the other, and neither may be coerced, because a coerced cost is a fabricated number
|
|
60
|
+
* sitting in the one column the product presents as measured.
|
|
61
|
+
*/
|
|
62
|
+
export declare function readCompletionGatewayReport(body: unknown): GatewayCallReport;
|
|
63
|
+
/**
|
|
64
|
+
* Read the report off an AI SDK generate result: the INLINE path's reader.
|
|
65
|
+
*
|
|
66
|
+
* Keyed on the `openrouter` metadata namespace because that is where the CLIENT puts it, not
|
|
67
|
+
* because the provider id is unreliable: the id is the closed {@link OPENAI_COMPATIBLE_PROVIDERS}
|
|
68
|
+
* table's own member, and {@link reportsGatewayAttribution} keys the request half on that same
|
|
69
|
+
* literal. Whoever adds the second gateway adds a namespace here beside a provider id there, and
|
|
70
|
+
* the pairing is what has to stay in step. Reading one off the other would not help: the two
|
|
71
|
+
* vocabularies are the vendor's and ours.
|
|
72
|
+
*/
|
|
73
|
+
export declare function readMetadataGatewayReport(result: unknown): GatewayCallReport;
|
|
74
|
+
//# sourceMappingURL=gateway-attribution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gateway-attribution.d.ts","sourceRoot":"","sources":["../../src/providers/gateway-attribution.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAqBnF,4FAA4F;AAC5F,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,kGAAkG;IAClG,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEnE;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,iBAA8C,GACtD,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CASzB;AASD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE;IAC1C,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,iBAAiB,CAAA;CAC3B,GAAG,MAAM,GAAG,SAAS,CAgBrB;AAYD;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,OAAO,GAAG,iBAAiB,CAS5E;AAED;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,OAAO,GAAG,iBAAiB,CAY5E"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { DEFAULT_OPENROUTER_ROUTING } from './endpoints.js';
|
|
2
|
+
/**
|
|
3
|
+
* Whether `provider` is a gateway this platform asks for usage accounting.
|
|
4
|
+
*
|
|
5
|
+
* Only OpenRouter today. The operator-hosted gateways (`bifrost`, `litellm`) speak plain
|
|
6
|
+
* OpenAI-compatible and publish no such fields, so asking them would put an unknown key in the
|
|
7
|
+
* body of a strict endpoint for nothing.
|
|
8
|
+
*/
|
|
9
|
+
export function reportsGatewayAttribution(provider) {
|
|
10
|
+
return provider === 'openrouter';
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The extra OpenAI Chat Completions body fields that turn a gateway's reporting on and state the
|
|
14
|
+
* deployment's routing policy, for the CONTAINER path. Empty for every provider that has none, so
|
|
15
|
+
* the proxy can merge it unconditionally (the shape `promptCacheParams` already established).
|
|
16
|
+
*
|
|
17
|
+
* Both members of {@link OpenRouterRouting} narrow the upstream pool, so both are the
|
|
18
|
+
* deployment's to set rather than constants here; see that type for what each buys and costs, and
|
|
19
|
+
* {@link gatewayRoutingRefusal} for what a caller says when the narrowing empties the pool.
|
|
20
|
+
*/
|
|
21
|
+
export function gatewayRequestParams(provider, routing = DEFAULT_OPENROUTER_ROUTING) {
|
|
22
|
+
if (!reportsGatewayAttribution(provider))
|
|
23
|
+
return {};
|
|
24
|
+
return {
|
|
25
|
+
usage: { include: true },
|
|
26
|
+
provider: {
|
|
27
|
+
require_parameters: routing.requireParameters,
|
|
28
|
+
data_collection: routing.dataCollection,
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* OpenRouter's wording when provider routing leaves no upstream to serve the model. Matched on
|
|
34
|
+
* the stable half of the sentence (`no allowed providers`), never the whole of it: the tail names
|
|
35
|
+
* the model and the head has already been reworded once.
|
|
36
|
+
*/
|
|
37
|
+
const NO_ALLOWED_PROVIDERS = /no allowed providers?/i;
|
|
38
|
+
/**
|
|
39
|
+
* Name the routing constraint that can have caused a gateway's refusal, or undefined when this
|
|
40
|
+
* failure is not one of ours to explain.
|
|
41
|
+
*
|
|
42
|
+
* Why it exists: the two constraints above are the only reason a model that resolves for everyone
|
|
43
|
+
* else fails for one deployment, and the gateway's own 404 says only that no provider was
|
|
44
|
+
* allowed. It cannot know WHICH allow-list did the excluding, because the platform's request is
|
|
45
|
+
* the only place both are stated. Left unexplained, the operator sees a run fail with an opaque
|
|
46
|
+
* upstream error and nothing anywhere connects it to a variable they set (or, worse, never set:
|
|
47
|
+
* `deny` is stricter than the vendor's own default, so the deployment that hits this hardest is
|
|
48
|
+
* the one that configured nothing).
|
|
49
|
+
*
|
|
50
|
+
* Only the constraints actually IN FORCE are named, so relaxing what it names is always a step
|
|
51
|
+
* forward; when neither is on, the refusal is the gateway's own and this answers undefined
|
|
52
|
+
* rather than sending the operator after a setting that changed nothing.
|
|
53
|
+
*/
|
|
54
|
+
export function gatewayRoutingRefusal(opts) {
|
|
55
|
+
if (!reportsGatewayAttribution(opts.provider))
|
|
56
|
+
return undefined;
|
|
57
|
+
if (opts.status < 400 || !NO_ALLOWED_PROVIDERS.test(opts.body))
|
|
58
|
+
return undefined;
|
|
59
|
+
const relaxable = [];
|
|
60
|
+
if (opts.routing.dataCollection === 'deny') {
|
|
61
|
+
relaxable.push('OPENROUTER_DATA_COLLECTION=allow (this deployment denies prompt-retaining upstreams)');
|
|
62
|
+
}
|
|
63
|
+
if (opts.routing.requireParameters) {
|
|
64
|
+
relaxable.push('OPENROUTER_REQUIRE_PARAMETERS=false (this deployment requires an upstream to advertise every request parameter)');
|
|
65
|
+
}
|
|
66
|
+
if (relaxable.length === 0)
|
|
67
|
+
return undefined;
|
|
68
|
+
return `OpenRouter had no upstream left to route to. This deployment's provider routing is what narrows the pool; relax one of: ${relaxable.join('; ')}.`;
|
|
69
|
+
}
|
|
70
|
+
/** A finite, non-negative number, else undefined. Zero passes: a free route reports one. */
|
|
71
|
+
function reportedCost(value) {
|
|
72
|
+
return typeof value === 'number' && Number.isFinite(value) && value >= 0 ? value : undefined;
|
|
73
|
+
}
|
|
74
|
+
/** A non-empty string, else undefined. */
|
|
75
|
+
function reportedUpstream(value) {
|
|
76
|
+
return typeof value === 'string' && value.length > 0 ? value : undefined;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Read the report off a raw OpenAI-shaped completion (or the final streamed chunk): the
|
|
80
|
+
* CONTAINER path's reader.
|
|
81
|
+
*
|
|
82
|
+
* OpenRouter puts the ledger cost on `usage.cost` and the upstream's name at the top level as
|
|
83
|
+
* `provider`. Both are read defensively and independently: a gateway that garbles one must not
|
|
84
|
+
* cost us the other, and neither may be coerced, because a coerced cost is a fabricated number
|
|
85
|
+
* sitting in the one column the product presents as measured.
|
|
86
|
+
*/
|
|
87
|
+
export function readCompletionGatewayReport(body) {
|
|
88
|
+
const completion = body;
|
|
89
|
+
if (!completion)
|
|
90
|
+
return {};
|
|
91
|
+
const cost = reportedCost(completion.usage?.cost);
|
|
92
|
+
const upstream = reportedUpstream(completion.provider);
|
|
93
|
+
return {
|
|
94
|
+
...(cost === undefined ? {} : { cost }),
|
|
95
|
+
...(upstream === undefined ? {} : { upstream }),
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Read the report off an AI SDK generate result: the INLINE path's reader.
|
|
100
|
+
*
|
|
101
|
+
* Keyed on the `openrouter` metadata namespace because that is where the CLIENT puts it, not
|
|
102
|
+
* because the provider id is unreliable: the id is the closed {@link OPENAI_COMPATIBLE_PROVIDERS}
|
|
103
|
+
* table's own member, and {@link reportsGatewayAttribution} keys the request half on that same
|
|
104
|
+
* literal. Whoever adds the second gateway adds a namespace here beside a provider id there, and
|
|
105
|
+
* the pairing is what has to stay in step. Reading one off the other would not help: the two
|
|
106
|
+
* vocabularies are the vendor's and ours.
|
|
107
|
+
*/
|
|
108
|
+
export function readMetadataGatewayReport(result) {
|
|
109
|
+
const metadata = result?.providerMetadata;
|
|
110
|
+
const openrouter = metadata?.openrouter;
|
|
111
|
+
if (!openrouter)
|
|
112
|
+
return {};
|
|
113
|
+
const cost = reportedCost(openrouter.usage?.cost);
|
|
114
|
+
const upstream = reportedUpstream(openrouter.provider);
|
|
115
|
+
return {
|
|
116
|
+
...(cost === undefined ? {} : { cost }),
|
|
117
|
+
...(upstream === undefined ? {} : { upstream }),
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=gateway-attribution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gateway-attribution.js","sourceRoot":"","sources":["../../src/providers/gateway-attribution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAA0B,MAAM,gBAAgB,CAAA;AAiCnF;;;;;;GAMG;AACH,MAAM,UAAU,yBAAyB,CAAC,QAAgB;IACxD,OAAO,QAAQ,KAAK,YAAY,CAAA;AAClC,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAClC,QAAgB,EAChB,OAAO,GAAsB,0BAA0B;IAEvD,IAAI,CAAC,yBAAyB,CAAC,QAAQ,CAAC;QAAE,OAAO,EAAE,CAAA;IACnD,OAAO;QACL,KAAK,EAAE,E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5,7 +5,8 @@ export { usageAttributionOf, usageBillingFields, type UsageAttributedLanguageMod
|
|
|
5
5
|
export { wrapModelPreservingMarkers, type ModelMarkers } from './model-markers.js';
|
|
6
6
|
export { InstrumentedModelProvider, catFactoryObservability, type InlineObservabilityContext, type WorkspaceBodiesGate, } from './instrumented.js';
|
|
7
7
|
export { LimitedModelProvider, VendorConcurrencyLimiter, limitModelProvider, vendorConcurrencyLimiterFromEnv, } from './limited.js';
|
|
8
|
-
export { anthropicResolver, baseProviderRegistry, cloudflareRestResolver, openAiCompatibleResolver, openAiResolver, } from './resolvers.js';
|
|
9
|
-
export { cloudflareRestBaseUrl, DEEPSEEK_BASE_URL, DEFAULT_OPENAI_COMPATIBLE_BASE_URLS, isDirectProvider, isOpenAiCompatibleProvider, isOperatorHostedGateway, isProxyableProvider, MOONSHOT_BASE_URL, OPENAI_BASE_URL, OPENAI_COMPATIBLE_PROVIDERS, OPENROUTER_BASE_URL, OPERATOR_HOSTED_GATEWAYS, QWEN_BASE_URL, resolveOpenAiCompatibleBaseUrl, type DirectProvider, type OpenAiCompatibleProvider, type OperatorHostedGateway, UI_CONFIGURABLE_DIRECT_PROVIDERS, XAI_BASE_URL, } from './endpoints.js';
|
|
8
|
+
export { anthropicResolver, baseProviderRegistry, cloudflareRestResolver, directOpenAiCompatibleResolver, openAiCompatibleResolver, openAiResolver, openRouterResolver, } from './resolvers.js';
|
|
9
|
+
export { cloudflareRestBaseUrl, DEEPSEEK_BASE_URL, DEFAULT_OPENAI_COMPATIBLE_BASE_URLS, isDirectProvider, isOpenAiCompatibleProvider, isOperatorHostedGateway, isProxyableProvider, MOONSHOT_BASE_URL, OPENAI_BASE_URL, OPENAI_COMPATIBLE_PROVIDERS, DEFAULT_OPENROUTER_ROUTING, OPENROUTER_BASE_URL, openRouterDataCollectionFrom, openRouterRequireParametersFrom, openRouterRoutingFrom, OPERATOR_HOSTED_GATEWAYS, type OpenRouterDataCollection, type OpenRouterRouting, QWEN_BASE_URL, resolveOpenAiCompatibleBaseUrl, type DirectProvider, type OpenAiCompatibleProvider, type OperatorHostedGateway, UI_CONFIGURABLE_DIRECT_PROVIDERS, XAI_BASE_URL, } from './endpoints.js';
|
|
10
|
+
export { gatewayRequestParams, gatewayRoutingRefusal, readCompletionGatewayReport, readMetadataGatewayReport, reportsGatewayAttribution, type GatewayCallReport, } from './gateway-attribution.js';
|
|
10
11
|
export { type CachePolicy, type InputTokenClasses, agentUsageFromModelUsage, readInputTokenClasses, inlineCacheProviderOptions, promptCacheParams, providerCachePolicy, } from './cache.js';
|
|
11
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,KAAK,aAAa,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AACjG,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,GAChC,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,KAAK,4BAA4B,EACjC,KAAK,gBAAgB,GACtB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,0BAA0B,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAClF,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,mBAAmB,GACzB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,kBAAkB,EAClB,+BAA+B,GAChC,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,KAAK,aAAa,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AACjG,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,GAChC,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,KAAK,4BAA4B,EACjC,KAAK,gBAAgB,GACtB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,0BAA0B,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAClF,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,mBAAmB,GACzB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,kBAAkB,EAClB,+BAA+B,GAChC,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,EACtB,8BAA8B,EAC9B,wBAAwB,EACxB,cAAc,EACd,kBAAkB,GACnB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,mCAAmC,EACnC,gBAAgB,EAChB,0BAA0B,EAC1B,uBAAuB,EACvB,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,2BAA2B,EAC3B,0BAA0B,EAC1B,mBAAmB,EACnB,4BAA4B,EAC5B,+BAA+B,EAC/B,qBAAqB,EACrB,wBAAwB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,aAAa,EACb,8BAA8B,EAC9B,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,gCAAgC,EAChC,YAAY,GACb,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,2BAA2B,EAC3B,yBAAyB,EACzB,yBAAyB,EACzB,KAAK,iBAAiB,GACvB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,wBAAwB,EACxB,qBAAqB,EACrB,0BAA0B,EAC1B,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,YAAY,CAAA"}
|
package/dist/providers/index.js
CHANGED
|
@@ -5,7 +5,8 @@ export { usageAttributionOf, usageBillingFields, } from './usage-attribution.js'
|
|
|
5
5
|
export { wrapModelPreservingMarkers } from './model-markers.js';
|
|
6
6
|
export { InstrumentedModelProvider, catFactoryObservability, } from './instrumented.js';
|
|
7
7
|
export { LimitedModelProvider, VendorConcurrencyLimiter, limitModelProvider, vendorConcurrencyLimiterFromEnv, } from './limited.js';
|
|
8
|
-
export { anthropicResolver, baseProviderRegistry, cloudflareRestResolver, openAiCompatibleResolver, openAiResolver, } from './resolvers.js';
|
|
9
|
-
export { cloudflareRestBaseUrl, DEEPSEEK_BASE_URL, DEFAULT_OPENAI_COMPATIBLE_BASE_URLS, isDirectProvider, isOpenAiCompatibleProvider, isOperatorHostedGateway, isProxyableProvider, MOONSHOT_BASE_URL, OPENAI_BASE_URL, OPENAI_COMPATIBLE_PROVIDERS, OPENROUTER_BASE_URL, OPERATOR_HOSTED_GATEWAYS, QWEN_BASE_URL, resolveOpenAiCompatibleBaseUrl, UI_CONFIGURABLE_DIRECT_PROVIDERS, XAI_BASE_URL, } from './endpoints.js';
|
|
8
|
+
export { anthropicResolver, baseProviderRegistry, cloudflareRestResolver, directOpenAiCompatibleResolver, openAiCompatibleResolver, openAiResolver, openRouterResolver, } from './resolvers.js';
|
|
9
|
+
export { cloudflareRestBaseUrl, DEEPSEEK_BASE_URL, DEFAULT_OPENAI_COMPATIBLE_BASE_URLS, isDirectProvider, isOpenAiCompatibleProvider, isOperatorHostedGateway, isProxyableProvider, MOONSHOT_BASE_URL, OPENAI_BASE_URL, OPENAI_COMPATIBLE_PROVIDERS, DEFAULT_OPENROUTER_ROUTING, OPENROUTER_BASE_URL, openRouterDataCollectionFrom, openRouterRequireParametersFrom, openRouterRoutingFrom, OPERATOR_HOSTED_GATEWAYS, QWEN_BASE_URL, resolveOpenAiCompatibleBaseUrl, UI_CONFIGURABLE_DIRECT_PROVIDERS, XAI_BASE_URL, } from './endpoints.js';
|
|
10
|
+
export { gatewayRequestParams, gatewayRoutingRefusal, readCompletionGatewayReport, readMetadataGatewayReport, reportsGatewayAttribution, } from './gateway-attribution.js';
|
|
10
11
|
export { agentUsageFromModelUsage, readInputTokenClasses, inlineCacheProviderOptions, promptCacheParams, providerCachePolicy, } from './cache.js';
|
|
11
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAA6C,MAAM,eAAe,CAAA;AACjG,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EACL,sBAAsB,EACtB,kBAAkB,GAMnB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,kBAAkB,EAClB,kBAAkB,GAGnB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,0BAA0B,EAAqB,MAAM,oBAAoB,CAAA;AAClF,OAAO,EACL,yBAAyB,EACzB,uBAAuB,GAGxB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,kBAAkB,EAClB,+BAA+B,GAChC,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAA6C,MAAM,eAAe,CAAA;AACjG,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EACL,sBAAsB,EACtB,kBAAkB,GAMnB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,kBAAkB,EAClB,kBAAkB,GAGnB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,0BAA0B,EAAqB,MAAM,oBAAoB,CAAA;AAClF,OAAO,EACL,yBAAyB,EACzB,uBAAuB,GAGxB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,kBAAkB,EAClB,+BAA+B,GAChC,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,EACtB,8BAA8B,EAC9B,wBAAwB,EACxB,cAAc,EACd,kBAAkB,GACnB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,mCAAmC,EACnC,gBAAgB,EAChB,0BAA0B,EAC1B,uBAAuB,EACvB,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,2BAA2B,EAC3B,0BAA0B,EAC1B,mBAAmB,EACnB,4BAA4B,EAC5B,+BAA+B,EAC/B,qBAAqB,EACrB,wBAAwB,EAGxB,aAAa,EACb,8BAA8B,EAI9B,gCAAgC,EAChC,YAAY,GACb,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,2BAA2B,EAC3B,yBAAyB,EACzB,yBAAyB,GAE1B,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAGL,wBAAwB,EACxB,qBAAqB,EACrB,0BAA0B,EAC1B,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,YAAY,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumented.d.ts","sourceRoot":"","sources":["../../src/providers/instrumented.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,IAAI,CAAA;AACvC,OAAO,KAAK,EACV,qBAAqB,EACrB,0BAA0B,EAE1B,YAAY,EACZ,MAAM,EACN,aAAa,EACb,QAAQ,EACR,qBAAqB,EACtB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,uBAAuB,EAOxB,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"instrumented.d.ts","sourceRoot":"","sources":["../../src/providers/instrumented.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,IAAI,CAAA;AACvC,OAAO,KAAK,EACV,qBAAqB,EACrB,0BAA0B,EAE1B,YAAY,EACZ,MAAM,EACN,aAAa,EACb,QAAQ,EACR,qBAAqB,EACtB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,uBAAuB,EAOxB,MAAM,qBAAqB,CAAA;AAK5B;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,mBAAmB,GAAG,qBAAqB,CAAA;AAKvD,OAAO,EAAE,uBAAuB,EAAE,CAAA;AAClC,YAAY,EAAE,0BAA0B,EAAE,CAAA;AA4J1C;;;;GAIG;AACH,qBAAa,yBAA0B,YAAW,aAAa;IAC7D,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAe;IACrC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAc;IACzC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAuB;IACnD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;IACvC,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAqB;IAC5D,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAe;IAChD,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAc;IAClC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAQ;IAE5B,YAAY,IAAI,EAAE;QAChB,KAAK,EAAE,aAAa,CAAA;QACpB;;;;;WAKG;QACH,SAAS,CAAC,EAAE,YAAY,CAAA;QACxB;;;;;WAKG;QACH,UAAU,CAAC,EAAE,qBAAqB,CAAA;QAClC,oFAAoF;QACpF,aAAa,CAAC,EAAE,OAAO,CAAA;QACvB;;;;;;;;;;;;WAYG;QACH,sBAAsB,EAAE,mBAAmB,CAAA;QAC3C;;;;;;;;;;;;;;;;;;;WAmBG;QACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;QACzB,wDAAwD;QACxD,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;QAClB,2EAA2E;QAC3E,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,EAiBA;IAED,OAAO,CAAC,GAAG,EAAE,QAAQ,GAAG,aAAa,CAmBpC;IAED,OAAO,CAAC,aAAa;IA8BrB,OAAO,CAAC,IAAI;IAqFZ;;;;;;;;;;OAUG;IACH,OAAO,CAAC,MAAM;IAsDd;;;;;;;;;OASG;YACW,aAAa;CAY5B"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { catFactoryObservability, describeError, getErrorMessage, noopLogger, redactImagePayloads, resolveInlineAttribution, runBestEffort, } from '@cat-factory/kernel';
|
|
2
2
|
import { reportsOwnLlmCalls } from './cli-inline.js';
|
|
3
|
+
import { readMetadataGatewayReport } from './gateway-attribution.js';
|
|
3
4
|
import { wrapModelPreservingMarkers } from './model-markers.js';
|
|
4
5
|
// Re-exported so existing `@cat-factory/agents` consumers keep importing the inline
|
|
5
6
|
// observability tag from here; the canonical, dependency-free definition lives in the
|
|
@@ -212,6 +213,17 @@ export class InstrumentedModelProvider {
|
|
|
212
213
|
throw err;
|
|
213
214
|
}
|
|
214
215
|
},
|
|
216
|
+
// Every inline site calls `generateText`, never `streamText`, an invariant the recorder
|
|
217
|
+
// states too by hard-coding `streaming: false` on the row it writes. This is what keeps
|
|
218
|
+
// the invariant from being a comment: a streamed call would pass through the wrap with no
|
|
219
|
+
// `wrapStream` and reach no sink, so its tokens would be spent, its OpenRouter usage
|
|
220
|
+
// accounting paid for, and nothing written anywhere. That is invisible downstream, where
|
|
221
|
+
// an unrecorded call and a step that spent nothing are the same absence, and it undercounts
|
|
222
|
+
// the budget the spend gate reads. Refusing costs nothing today and names the two things a
|
|
223
|
+
// streaming caller has to build.
|
|
224
|
+
wrapStream: async () => {
|
|
225
|
+
throw new Error('InstrumentedModelProvider does not record streamed calls: implement wrapStream (fold the final stream part into `emit`) and thread `streaming` through the inline recorder before calling streamText.');
|
|
226
|
+
},
|
|
215
227
|
};
|
|
216
228
|
}
|
|
217
229
|
emit(ref, params, result, startedAt, ok, errMessage) {
|
|
@@ -223,6 +235,8 @@ export class InstrumentedModelProvider {
|
|
|
223
235
|
// workspace, which is a reason for a caller to tag its call and not for this to guess.
|
|
224
236
|
const { workspaceId, executionId, agentKind } = resolveInlineAttribution(params, this.scopeExecutionId ? { executionId: this.scopeExecutionId } : {});
|
|
225
237
|
const usage = readUsage(result?.usage);
|
|
238
|
+
// Only a SETTLED call can carry a gateway report; a throw has no result to read one off.
|
|
239
|
+
const gateway = ok ? readMetadataGatewayReport(result) : {};
|
|
226
240
|
const finishReason = ok ? readFinishReason(result) : null;
|
|
227
241
|
// The recorder is the richer exit AND owns the sink fan-out, so a workspace-scoped call
|
|
228
242
|
// takes it and stops. An un-tagged call (`workspaceId: null`) has no workspace to file a
|
|
@@ -237,6 +251,7 @@ export class InstrumentedModelProvider {
|
|
|
237
251
|
params,
|
|
238
252
|
result,
|
|
239
253
|
usage,
|
|
254
|
+
gateway,
|
|
240
255
|
durationMs: Math.max(0, endedAt - startedAt),
|
|
241
256
|
finishReason,
|
|
242
257
|
ok,
|
|
@@ -312,6 +327,10 @@ export class InstrumentedModelProvider {
|
|
|
312
327
|
durationMs: call.durationMs,
|
|
313
328
|
ok,
|
|
314
329
|
errorMessage: call.errMessage,
|
|
330
|
+
...(call.gateway.cost === undefined ? {} : { reportedCostUsd: call.gateway.cost }),
|
|
331
|
+
...(call.gateway.upstream === undefined
|
|
332
|
+
? {}
|
|
333
|
+
: { upstreamProvider: call.gateway.upstream }),
|
|
315
334
|
// Thunks: the service resolves a body only after its gate says it will be stored,
|
|
316
335
|
// so a prompts-off deployment never serialises a prompt array it then drops.
|
|
317
336
|
promptText: () => safeJson(params?.prompt),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumented.js","sourceRoot":"","sources":["../../src/providers/instrumented.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,eAAe,EACf,UAAU,EACV,mBAAmB,EACnB,wBAAwB,EACxB,aAAa,GACd,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAA;AAkB/D,oFAAoF;AACpF,sFAAsF;AACtF,kFAAkF;AAClF,OAAO,EAAE,uBAAuB,EAAE,CAAA;AAGlC,qFAAqF;AACrF,yFAAyF;AACzF,sEAAsE;AACtE,2FAA2F;AAC3F,qFAAqF;AACrF,4FAA4F;AAC5F,8FAA8F;AAC9F,2FAA2F;AAC3F,mFAAmF;AACnF,EAAE;AACF,yFAAyF;AACzF,4FAA4F;AAC5F,2FAA2F;AAC3F,6FAA6F;AAC7F,qBAAqB;AACrB,6FAA6F;AAC7F,oFAAoF;AACpF,EAAE;AACF,4FAA4F;AAC5F,4FAA4F;AAC5F,6DAA6D;AAC7D,EAAE;AACF,gFAAgF;AAChF,iFAAiF;AACjF,sFAAsF;AACtF,kFAAkF;AAClF,oFAAoF;AACpF,wBAAwB;AAExB,gGAAgG;AAChG;;;;;;;;;;;GAWG;AACH,SAAS,SAAS,CAAC,KAAc;IAO/B,MAAM,CAAC,GAAG,KAA4C,CAAA;IACtD,IAAI,CAAC,CAAC;QAAE,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE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AMG;AACH,SAAS,QAAQ,CAAC,KAAc;IAC9B,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,SAAS,CAAC,mBAAmB,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAA;IACzD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAA;IACX,CAAC;AACH,CAAC"}
|
|
1
|
+
{"version":3,"file":"instrumented.js","sourceRoot":"","sources":["../../src/providers/instrumented.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,eAAe,EACf,UAAU,EACV,mBAAmB,EACnB,wBAAwB,EACxB,aAAa,GACd,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,EAAE,yBAAyB,EAA0B,MAAM,0BAA0B,CAAA;AAC5F,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAA;AAkB/D,oFAAoF;AACpF,sFAAsF;AACtF,kFAAkF;AAClF,OAAO,EAAE,uBAAuB,EAAE,CAAA;AAGlC,qFAAqF;AACrF,yFAAyF;AACzF,sEAAsE;AACtE,2FAA2F;AAC3F,qFAAqF;AACrF,4FAA4F;AAC5F,8FAA8F;AAC9F,2FAA2F;AAC3F,mFAAmF;AACnF,EAAE;AACF,yFAAyF;AACzF,4FAA4F;AAC5F,2FAA2F;AAC3F,6FAA6F;AAC7F,qBAAqB;AACrB,6FAA6F;AAC7F,oFAAoF;AACpF,EAAE;AACF,4FAA4F;AAC5F,4FAA4F;AAC5F,6DAA6D;AAC7D,EAAE;AACF,gFAAgF;AAChF,iFAAiF;AACjF,sFAAsF;AACtF,kFAAkF;AAClF,oFAAoF;AACpF,wBAAwB;AAExB,gGAAgG;AAChG;;;;;;;;;;;GAWG;AACH,SAAS,SAAS,CAAC,KAAc;IAO/B,MAAM,CAAC,GAAG,KAA4C,CAAA;IACtD,IAAI,CAAC,CAAC;QAAE,OAAO,EAAE,MAAM,EA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,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACtD,aAAa,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;SAC3D,CAAC,EACJ,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,CAC/C,CAAA;IACH,CAAC;IAED;;;;;;;;;OASG;IACK,KAAK,CAAC,aAAa,CAAC,WAA0B;QACpD,IAAI,CAAC,IAAI,CAAC,aAAa;YAAE,OAAO,KAAK,CAAA;QACrC,IAAI,CAAC;YACH,OAAO,MAAM,IAAI,CAAC,sBAAsB,CAAC,WAAW,CAAC,CAAA;QACvD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,8DAA8D,EAAE;gBAC5E,GAAG,aAAa,CAAC,KAAK,CAAC;gBACvB,WAAW;aACZ,CAAC,CAAA;YACF,OAAO,KAAK,CAAA;QACd,CAAC;IACH,CAAC;CACF;AAED;;;;;;GAMG;AACH,SAAS,QAAQ,CAAC,KAAc;IAC9B,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,SAAS,CAAC,mBAAmB,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAA;IACzD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAA;IACX,CAAC;AACH,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type OpenRouterRouting } from './endpoints.js';
|
|
1
2
|
import type { ModelResolver, ProviderRegistry } from './registry.js';
|
|
2
3
|
/** Resolver for OpenAI (or any drop-in compatible base URL using the OpenAI SDK). */
|
|
3
4
|
export declare function openAiResolver(opts: {
|
|
@@ -28,6 +29,52 @@ export declare function openAiCompatibleResolver(opts: {
|
|
|
28
29
|
apiKey: string;
|
|
29
30
|
baseURL: string;
|
|
30
31
|
fetch?: typeof fetch;
|
|
32
|
+
/**
|
|
33
|
+
* Whether this upstream honours `response_format: { type: 'json_schema' }`.
|
|
34
|
+
*
|
|
35
|
+
* Load-bearing, and silent when wrong in the permissive direction: with it unset the
|
|
36
|
+
* `@ai-sdk/openai-compatible` client DOWNGRADES a schema-carrying request to
|
|
37
|
+
* `{ type: 'json_object' }` and DROPS the schema, emitting only an SDK warning nothing here
|
|
38
|
+
* reads (`dist/index.js`, the `response_format` ternary). The caller then gets free-form JSON
|
|
39
|
+
* that happens to parse, against a shape nobody enforced. Defaults to false because it is the
|
|
40
|
+
* SDK's own default and because the upstreams that genuinely may not serve `json_schema` are
|
|
41
|
+
* the ones nobody here can vouch for: a per-user local runner (Ollama, LM Studio) and an
|
|
42
|
+
* operator-hosted gateway fronting one. {@link directOpenAiCompatibleResolver} decides which
|
|
43
|
+
* of its providers may claim it; no caller passes a bare true.
|
|
44
|
+
*/
|
|
45
|
+
supportsStructuredOutputs?: boolean;
|
|
46
|
+
}): ModelResolver;
|
|
47
|
+
/**
|
|
48
|
+
* Resolver for OpenRouter, which is a GATEWAY rather than one more OpenAI-compatible vendor
|
|
49
|
+
* and is therefore not served by {@link openAiCompatibleResolver}.
|
|
50
|
+
*
|
|
51
|
+
* Three things the generic client structurally cannot do, each of which OpenRouter answers:
|
|
52
|
+
*
|
|
53
|
+
* - **It reports what the call actually cost.** `usage: { include: true }` turns on usage
|
|
54
|
+
* accounting, and the reply carries `providerMetadata.openrouter.usage.cost` (real USD, the
|
|
55
|
+
* gateway's own ledger) plus `provider` (which upstream served it). Everywhere else this
|
|
56
|
+
* platform DERIVES cost from a price table; against a passthrough gateway reselling 300+
|
|
57
|
+
* models that derivation is a guess, and this is the one provider that hands over the answer.
|
|
58
|
+
* - **It routes per request.** {@link OpenRouterRouting} states the two constraints a
|
|
59
|
+
* deployment puts on that routing: keeping the request off an upstream that would silently
|
|
60
|
+
* ignore a tool definition, and off one that retains prompts. Both are the deployment's
|
|
61
|
+
* rather than constants here, because both can narrow the pool to nothing.
|
|
62
|
+
*
|
|
63
|
+
* NOT set here: `structuredOutputs.strict`, which this client already defaults to true ("When
|
|
64
|
+
* `strict` is left unset, the SDK defaults to `true` for backward compatibility", its own option
|
|
65
|
+
* doc). The trap runs the OPPOSITE way round from {@link openAiCompatibleResolver}'s, where the
|
|
66
|
+
* default is false and a schema is silently dropped: here the option exists to opt OUT for a
|
|
67
|
+
* model whose upstream does not advertise strict mode, so writing `strict: true` would pin the
|
|
68
|
+
* default while reading like an opt-in nobody may remove.
|
|
69
|
+
*/
|
|
70
|
+
export declare function openRouterResolver(opts: {
|
|
71
|
+
apiKey: string;
|
|
72
|
+
/** Defaults to {@link OPENROUTER_BASE_URL}; a deployment override wins. */
|
|
73
|
+
baseURL?: string;
|
|
74
|
+
/** The deployment's routing constraints; defaults to {@link DEFAULT_OPENROUTER_ROUTING}. */
|
|
75
|
+
routing?: OpenRouterRouting;
|
|
76
|
+
/** Injected transport (tests); defaults to the SDK's own fetch. */
|
|
77
|
+
fetch?: typeof fetch;
|
|
31
78
|
}): ModelResolver;
|
|
32
79
|
/**
|
|
33
80
|
* Resolver for Cloudflare-hosted models reached over HTTP (no Workers `AI` binding):
|
|
@@ -44,11 +91,41 @@ export declare function cloudflareRestResolver(opts: {
|
|
|
44
91
|
/** Full override of the base URL (wins over accountId/gateway). */
|
|
45
92
|
baseURL?: string;
|
|
46
93
|
}): ModelResolver;
|
|
94
|
+
/**
|
|
95
|
+
* Turn ONE key-pooled OpenAI-compatible provider into its resolver, dispatching OpenRouter to
|
|
96
|
+
* {@link openRouterResolver} and everything else to {@link openAiCompatibleResolver}.
|
|
97
|
+
*
|
|
98
|
+
* The single place that dispatch is made. Every entry point that builds a direct provider from a
|
|
99
|
+
* leased key routes through here: the server's `buildDirectResolver`, which is the one this
|
|
100
|
+
* repo's facades run on, and {@link baseProviderRegistry}, the exported deployment-level seam a
|
|
101
|
+
* host assembling its own registry uses. Neither may make the OpenRouter-vs-generic decision
|
|
102
|
+
* itself, because that split is invisible at runtime: the generic client answers correctly, it
|
|
103
|
+
* just answers with no reported cost and no upstream name, which reads downstream as a gateway
|
|
104
|
+
* that reports nothing rather than as a mis-wired resolver.
|
|
105
|
+
*
|
|
106
|
+
* `supportsStructuredOutputs` is claimed for the CLOUD VENDORS only, and withheld from the
|
|
107
|
+
* operator-hosted gateways for the same reason a per-user local runner is left on the SDK's own
|
|
108
|
+
* default: what `bifrost` and `litellm` serve is whatever the operator's `config.yaml` points
|
|
109
|
+
* them at, routinely an Ollama or vLLM model that answers a `json_schema` request with a 400.
|
|
110
|
+
* Claiming it there would turn today's silent downgrade to `json_object` into a hard failure on
|
|
111
|
+
* the first `generateObject` call, and the flag is per PROVIDER, so no caller could exempt them.
|
|
112
|
+
* The set is DERIVED from the endpoint table's own `null` entries ({@link isOperatorHostedGateway})
|
|
113
|
+
* rather than re-listed, so a gateway added there cannot be forgotten here.
|
|
114
|
+
*/
|
|
115
|
+
export declare function directOpenAiCompatibleResolver(provider: string, apiKey: string, opts: {
|
|
116
|
+
baseURL: string;
|
|
117
|
+
openRouterRouting?: OpenRouterRouting;
|
|
118
|
+
}): ModelResolver;
|
|
47
119
|
/**
|
|
48
120
|
* Build the base provider registry from a deployment's credentials. Each provider is
|
|
49
121
|
* registered only when its credential is present, so an unconfigured provider resolves
|
|
50
122
|
* to a clear "Unsupported model provider" error rather than a deep SDK failure. Mix
|
|
51
123
|
* extra registries (e.g. Bedrock, the Workers AI binding) in afterwards.
|
|
124
|
+
*
|
|
125
|
+
* The EXPORTED seam, with no caller inside this repo: both facades build their per-scope
|
|
126
|
+
* providers through the server's `buildDirectResolver` instead. It stays because a host
|
|
127
|
+
* assembling a registry from raw credentials is the shape this package publishes, and it takes
|
|
128
|
+
* the same routing option that path does, so the two cannot answer differently.
|
|
52
129
|
*/
|
|
53
130
|
export declare function baseProviderRegistry(opts: {
|
|
54
131
|
openaiApiKey?: string;
|
|
@@ -65,5 +142,7 @@ export declare function baseProviderRegistry(opts: {
|
|
|
65
142
|
gateway?: string;
|
|
66
143
|
baseURL?: string;
|
|
67
144
|
};
|
|
145
|
+
/** The deployment's OpenRouter routing constraints; see {@link OpenRouterRouting}. */
|
|
146
|
+
openRouterRouting?: OpenRouterRouting;
|
|
68
147
|
}): ProviderRegistry;
|
|
69
148
|
//# sourceMappingURL=resolvers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolvers.d.ts","sourceRoot":"","sources":["../../src/providers/resolvers.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAOpE,qFAAqF;AACrF,wBAAgB,cAAc,CAAC,IAAI,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,aAAa,CAMzF;AAED,8BAA8B;AAC9B,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,aAAa,CAM5F;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE;IAC7C,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,KAAK,CAAA;CACrB,GAAG,aAAa,
|
|
1
|
+
{"version":3,"file":"resolvers.d.ts","sourceRoot":"","sources":["../../src/providers/resolvers.ts"],"names":[],"mappings":"AAIA,OAAO,EAKL,KAAK,iBAAiB,EACvB,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAOpE,qFAAqF;AACrF,wBAAgB,cAAc,CAAC,IAAI,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC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