openclaw/packages
RileyJJY 754812315a
fix(ai): prevent context fallback for valid Chat Completions usage (#146905)
Fixes #146859.

`parseOpenAICompletionsUsage` now fills `contextUsage` from coherent prompt/completion/total counts. That lets the context guard for openai-completions providers use the provider snapshot instead of the transcript estimate. Inconsistent totals still fall back to the estimate.

Proof: real isolated Gateways with a localhost Chat Completions SSE server. main used `transcript_estimate` on the second turn; this PR uses `provider_context_usage`. An inconsistent total still falls back. Regression tests fail on main and pass here.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-10-01 17:43:05 +08:00
..
acp-core refactor(packages): deslop shared packages fourth pass (#161002) 2026-09-28 23:40:07 -07:00
agent-core fix: loop detection does not stop a tool call repeated with invalid arguments (#158709) 2026-10-01 12:23:40 +08:00
ai fix(ai): prevent context fallback for valid Chat Completions usage (#146905) 2026-10-01 17:43:05 +08:00
gateway-client refactor(packages): deslop shared packages sixth pass (#161675) 2026-09-30 06:21:52 +00:00
gateway-protocol feat: back up to external disks and Cloudflare R2 with storage locations (#161913) 2026-10-01 02:05:44 -07:00
llm-core fix(tools): percent-encoded schema refs lose types for Gemini and break argument coercion (#162435) 2026-10-01 15:30:25 +08:00
markdown-core test(agents, memory, ui, tooling): remove low-value tests (batch d112) (#161835) 2026-09-30 11:59:03 +00:00
media-core refactor(packages): deslop shared packages sixth pass (#161675) 2026-09-30 06:21:52 +00:00
media-generation-core refactor(packages): deslop shared packages third pass (#159933) 2026-09-27 20:53:42 -07:00
media-understanding-common refactor(packages): deslop shared packages third pass (#159933) 2026-09-27 20:53:42 -07:00
memory-host-sdk fix(memory): keep corpus discovery read-only during forget (#162155) 2026-09-30 20:02:16 -07:00
mermaid-renderer fix: restore bundled Mermaid parser license notices (#157461) 2026-09-25 14:21:38 -07:00
model-catalog-core refactor(packages): deslop shared packages fifth pass (#161210) 2026-09-29 14:30:03 -07:00
net-policy refactor(packages): deslop shared packages second pass (#159279) 2026-09-28 14:37:02 -07:00
normalization-core fix(tools): percent-encoded schema refs lose types for Gemini and break argument coercion (#162435) 2026-10-01 15:30:25 +08:00
plugin-package-contract refactor(packages): deslop shared packages second pass (#159279) 2026-09-28 14:37:02 -07:00
plugin-sdk refactor(packages): deslop shared packages third pass (#159933) 2026-09-27 20:53:42 -07:00
retry fix(gateway): handle connection bursts behind shared IPs (#160814) 2026-09-29 00:48:30 +00:00
sdk refactor(sdk): remove unused test fixture members (#161830) 2026-09-30 18:21:57 +07:00
session-url-contract refactor(packages): deslop shared packages sixth pass (#161675) 2026-09-30 06:21:52 +00:00
terminal-core refactor(packages): deslop shared packages fourth pass (#161002) 2026-09-28 23:40:07 -07:00
tool-call-repair test(core,plugins): remove low-value tests (batch d117) (#162104) 2026-09-30 21:48:00 +00:00
workboard-contract feat(workboard): add a people view filter to Sessions boards (#162283) 2026-09-30 21:02:35 -07:00
tsconfig.json perf(lint): bound the package fallback type graph (#160281) 2026-09-29 00:27:31 +07:00