@ouro.bot/cli 0.1.0-alpha.1478 → 0.1.0-alpha.1479

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/changelog.json CHANGED
@@ -2,14 +2,15 @@
2
2
  "_note": "Each pull request writes its own change note under changes/; the release job on main gives each landed change its version and adds the notes here (scripts/release-version.cjs). On main this file stops at the last version set by hand; the published package has every release. Agents read this file directly via read_file to understand what changed between versions.",
3
3
  "versions": [
4
4
  {
5
- "version": "0.1.0-alpha.1478",
5
+ "version": "0.1.0-alpha.1479",
6
6
  "changes": [
7
7
  "The blind-interview runner has optional hooks for products that aren't scored on the books household, so the component-kit product and the harness product can plug in without changing the runner again:",
8
8
  "A product kit can supply its own job (`job`), its own verdict on a run (`grade`) and its own fidelity notes (`fidelity`).",
9
9
  "A tool answer can end the user turn (`ends`), as a `finish` tool does, without an extra model call.",
10
10
  "The guest picks each product's arms from a map of builders.",
11
11
  "A guest's own grade comes back through the sandbox unchanged.",
12
- "X works as before, and a regression test checks that."
12
+ "X works as before, and a regression test checks that.",
13
+ "Token usage now keeps the cached input tokens that a provider reports, as `cached_input_tokens`, from chat completions (`prompt_tokens_details.cached_tokens`) and from the Responses API (`input_tokens_details.cached_tokens`). It's left out when the provider doesn't report a number. Cached tokens are billed at a lower price, so an eval's report now has what it needs to price each call exactly. The eval's own budget still prices every input token at the full rate, which overstates cached calls."
13
14
  ]
14
15
  },
15
16
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "runtimeVersion": "0.1.0-alpha.1478",
2
+ "runtimeVersion": "0.1.0-alpha.1479",
3
3
  "bundleSchemaVersion": 3,
4
4
  "lastUpdated": "2026-09-03T00:00:00.000Z"
5
5
  }
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0"?>
2
2
  <Container version="2">
3
3
  <Name>ouro-butler</Name>
4
- <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.1478</Repository>
4
+ <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.1479</Repository>
5
5
  <Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
6
6
  <Network>host</Network>
7
7
  <Shell>sh</Shell>
@@ -661,8 +661,11 @@ async function streamChatCompletion(client, createParams, callbacks, signal, eag
661
661
  // Capture usage from final chunk (sent when stream_options.include_usage is true)
662
662
  if (chunk.usage) {
663
663
  const u = chunk.usage;
664
+ const cached = u.prompt_tokens_details?.cached_tokens;
664
665
  usage = {
665
666
  input_tokens: u.prompt_tokens,
667
+ // Some OpenAI-compatible gateways send null; only a number is a reported count.
668
+ ...(typeof cached === "number" ? { cached_input_tokens: cached } : {}),
666
669
  output_tokens: u.completion_tokens,
667
670
  reasoning_tokens: u.completion_tokens_details?.reasoning_tokens ?? 0,
668
671
  total_tokens: u.total_tokens,
@@ -869,8 +872,10 @@ async function streamResponsesApi(client, createParams, callbacks, signal, eager
869
872
  incomplete = true;
870
873
  const u = event.response?.usage;
871
874
  if (u) {
875
+ const cached = u.input_tokens_details?.cached_tokens;
872
876
  usage = {
873
877
  input_tokens: u.input_tokens,
878
+ ...(typeof cached === "number" ? { cached_input_tokens: cached } : {}),
874
879
  output_tokens: u.output_tokens,
875
880
  reasoning_tokens: u.output_tokens_details?.reasoning_tokens ?? 0,
876
881
  total_tokens: u.total_tokens,
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.1478",
3
+ "version": "0.1.0-alpha.1479",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@ouro.bot/cli",
9
- "version": "0.1.0-alpha.1478",
9
+ "version": "0.1.0-alpha.1479",
10
10
  "bundleDependencies": [
11
11
  "@ouro.bot/friends"
12
12
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.1478",
3
+ "version": "0.1.0-alpha.1479",
4
4
  "description": "Ouroboros, the agent harness: agents with durable memory that live where you talk (terminal, Teams, iMessage, mail, voice) and use real tools. Start with npx ouro.bot@latest.",
5
5
  "homepage": "https://ouroboros.bot/",
6
6
  "engines": {