Skip to content

$ llm codec: reasoning asks and hosted tools stop crossing into Bedrock/Anthropic, as in 1.5.5 - #850

Draft
MattJackson wants to merge 2 commits into
predevfrom
lane-llm-billing-upstream-work
Draft

MattJackson wants to merge 2 commits into
predevfrom
lane-llm-billing-upstream-work

Conversation

@MattJackson

Copy link
Copy Markdown
Collaborator

What. This restores 1.5.5 for two translations that made a request bill work 1.5.5 never billed.

  1. Bedrock thinking (row-159 L2#2, HIGH).
    • Before: a foreign reasoning ask (reasoning_effort, Anthropic thinking, Gemini budget) was written as Claude additionalModelRequestFields.thinking on a Bedrock Claude lane. That billed thinking tokens, stripped temperature/topP/top_k, and downgraded a forced toolChoice.
    • Before: the Bedrock reader promoted additionalModelRequestFields thinking/reasoningConfig/output_config.effort, so a Bedrock caller's ask switched thinking on at a foreign lane.
    • 1.5.5 dropped every cross-protocol ask on Bedrock egress (v1.5.5 crates/busbar/src/proto/bedrock/writer.rs:139-146) and promoted none (reader.rs:678, reasoning: None).
    • Now: the ask is dropped with a warn and reported as reasoning. The native additionalModelRequestFields still round-trips verbatim on the same dialect. The one registered crossing (CHANGELOG 1.6.0), Converse's top-level outputConfig.effort, is unchanged.
  2. Anthropic hosted tools (row-159 L2#3, HIGH).
    • Before: a hosted tool that crossed the seam (Responses web_search, Chat web_search_options, web fetch, code execution) was written as an Anthropic server tool. Anthropic ran the searches and the turn charged search_units through server_tool_use.web_search_requests.
    • 1.5.5 stripped hosted tools before the Anthropic writer (v1.5.5 crates/busbar/src/proto/anthropic/writer.rs:171-178).
    • Now: they are dropped with a warn and reported. An Anthropic caller's own server tools are still relayed byte for byte, because the writer runs only across dialects.

Why. BUSBAR-1.6.0.md THE LLM DIALECT FIDELITY RULE: byte moves are pre-approved, but "Billing never moves". §7 Money and #77 keep the money path at 1.5.5. Neither move has an accepted-differences entry or a CHANGELOG line; the CHANGELOG lists only outputConfig.effort for Bedrock.

RED-able tests (1.5.5 egress bytes, from the lines above):

  • bedrock/tests/ir_slot_wiring_tests.rs::a_reasoning_ask_neither_reaches_nor_leaves_bedrock_as_in_1_5_5: covers every ask kind × caps × model family, plus every native spelling on the read side.
  • bedrock/tests/ir_mapping_structured_tests.rs::{a_native_reasoning_ask_is_not_promoted_to_the_ir, a_foreign_reasoning_ask_is_dropped_on_bedrock_egress}: temperature, topP and top_k are kept.
  • bedrock/tests/ir_round3_tests.rs::{item12_off_writes_no_thinking_on_any_lane, item8_a_word_ask_on_an_adaptive_lane_writes_no_thinking}.
  • codec/tests/ir_seam_tests.rs::bedrock_thinking_is_written_for_no_lane_model.
  • codec/tests/parked_rows_cross_dialect_tests.rs: an additionalModelRequestFields budget no longer overrides the registered effort word.
  • anthropic/tests/ir_slot_wiring_tests.rs::hosted_tools_that_crossed_the_seam_are_dropped_on_anthropic_egress, plus the ANT-13 round trip.
  • req_a2b_thinking_metadata.json returns to its bytes from before 91ba178 ({"additionalModelRequestFields":{"top_k":40},…}).

No ledger, oracle cell or ceiling changes (net −390 lines).

…rock/Anthropic, as in 1.5.5

Two translations added upstream work that a key is billed for, with no owner ruling signing it:
- A foreign reasoning ask was written as Claude `thinking` on a Bedrock Claude lane (billed
  thinking tokens; temperature/topP/top_k stripped and a forced toolChoice downgraded), and the
  Bedrock reader promoted additionalModelRequestFields thinking/reasoningConfig/output_config.effort
  so a Bedrock caller's ask switched thinking on at a foreign lane. 1.5.5 dropped every
  cross-protocol ask on Bedrock egress (v1.5.5 crates/busbar/src/proto/bedrock/writer.rs:139-146)
  and read none (reader.rs:678). The registered crossing, top-level outputConfig.effort, stays.
- A hosted tool that crossed the seam (Responses web_search, Chat web_search_options, web fetch,
  code execution) was written as an Anthropic server tool, so Anthropic ran searches and the turn
  charged search_units. 1.5.5 stripped hosted tools before the Anthropic writer
  (v1.5.5 crates/busbar/src/proto/anthropic/writer.rs:171-178).
Both are now dropped through the one drop path (warn + reported control). Tests pin 1.5.5's egress
bytes; req_a2b_thinking_metadata.json returns to its pre-BED-06 bytes.
…t no additionalModelRequestFields reasoning ask is read or written, as in 1.5.5
@MattJackson

Copy link
Copy Markdown
Collaborator Author

row 155 B2 (#974) edits crates/busbar-plane-llm/src/codec/bedrock/mod.rs at fn claims and the DECL quota_exceeded_status / auth_failure_status_and_kind rows; disjoint from this PR's hunks.

@MattJackson
MattJackson marked this pull request as draft October 14, 2026 19:52
@MattJackson MattJackson added the alone ModernCI: judge and land alone (never batched) label Oct 14, 2026
@MattJackson
MattJackson marked this pull request as ready for review October 14, 2026 20:22
@MattJackson
MattJackson marked this pull request as draft October 14, 2026 22:39

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

alone ModernCI: judge and land alone (never batched)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant