@veryfront/ext-llm-anthropic 0.1.1032 → 0.1.1035

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.
@@ -1 +1 @@
1
- {"version":3,"file":"anthropic-stream.d.ts","sourceRoot":"","sources":["../src/anthropic-stream.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAgB9D,KAAK,sBAAsB,GAAG;IAC5B,iCAAiC,CAAC,EAAE,MAAM,CAAC;CAC5C,CAAC;AAmBF,wBAAgB,8BAA8B,CAC5C,GAAG,EAAE,OAAO,GACX,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAgBlD;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,YAAY,GAAG,SAAS,CA+DhF;AAqED,wBAAuB,8BAA8B,CACnD,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC,EAClC,OAAO,GAAE,sBAA2B,GACnC,aAAa,CAAC,OAAO,CAAC,CAoUxB"}
1
+ {"version":3,"file":"anthropic-stream.d.ts","sourceRoot":"","sources":["../src/anthropic-stream.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAgB9D,KAAK,sBAAsB,GAAG;IAC5B,iCAAiC,CAAC,EAAE,MAAM,CAAC;CAC5C,CAAC;AAmBF,wBAAgB,8BAA8B,CAC5C,GAAG,EAAE,OAAO,GACX,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAgBlD;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,YAAY,GAAG,SAAS,CA+DhF;AAqDD,wBAAuB,8BAA8B,CACnD,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC,EAClC,OAAO,GAAE,sBAA2B,GACnC,aAAa,CAAC,OAAO,CAAC,CA4TxB"}
@@ -90,21 +90,6 @@ function isToolCallsFinishReason(finishReason) {
90
90
  return finishReason === "tool-calls" ||
91
91
  (typeof finishReason === "object" && finishReason?.unified === "tool-calls");
92
92
  }
93
- function hasGatewayUsageMetadata(usage) {
94
- return usage?.billableInputTokens !== undefined ||
95
- usage?.billableOutputTokens !== undefined ||
96
- usage?.providerInputCostUsd !== undefined ||
97
- usage?.providerOutputCostUsd !== undefined ||
98
- usage?.providerCostUsd !== undefined ||
99
- usage?.veryfrontInputChargeUsd !== undefined ||
100
- usage?.veryfrontOutputChargeUsd !== undefined ||
101
- usage?.veryfrontChargeUsd !== undefined ||
102
- usage?.veryfrontBilledUsd !== undefined ||
103
- usage?.costCredits !== undefined ||
104
- usage?.costSource !== undefined ||
105
- usage?.billingMode !== undefined ||
106
- usage?.usageCaptureStatus !== undefined;
107
- }
108
93
  async function readStreamChunk(reader, timeoutMs) {
109
94
  if (timeoutMs === undefined) {
110
95
  const read = await reader.read();
@@ -393,11 +378,6 @@ export async function* streamAnthropicCompatibleParts(stream, options = {}) {
393
378
  if (isToolCallsFinishReason(finishReason)) {
394
379
  clientToolUseIdleDeadlineMs = null;
395
380
  clientToolUseTerminalDeadlineMs ??= Date.now() + trailingUsageGraceMs;
396
- if (hasGatewayUsageMetadata(usage)) {
397
- await cancelStreamReader(reader, "Finished Anthropic tool-use turn after gateway usage metadata");
398
- yield buildFinishPart();
399
- return;
400
- }
401
381
  }
402
382
  else {
403
383
  clientToolUseIdleDeadlineMs ??= Date.now() + trailingUsageGraceMs;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veryfront/ext-llm-anthropic",
3
- "version": "0.1.1032",
3
+ "version": "0.1.1035",
4
4
  "description": "Veryfront first-party extension package for ext-llm-anthropic",
5
5
  "keywords": [
6
6
  "veryfront",
@@ -50,7 +50,7 @@
50
50
  "@deno/shim-timers": "~0.1.0"
51
51
  },
52
52
  "peerDependencies": {
53
- "veryfront": "^0.1.1032"
53
+ "veryfront": "^0.1.1035"
54
54
  },
55
55
  "type": "module",
56
56
  "types": "./esm/index.d.ts",