style(count_tokens): drop the new docstrings

This commit is contained in:
mateo-berri 2026-10-29 04:47:04 -07:00
parent f012c60033
commit 875a0e6404
4 changed files with 0 additions and 13 deletions

View file

@ -349,8 +349,6 @@ def _beta_header_values(side: str | Sequence[str] | None) -> tuple[str, ...]:
def context_management_betas(context_management: JsonValue) -> frozenset[str]:
"""The anthropic-beta values a ``context_management`` body needs: the compact beta for a
``compact_20260112`` edit and the context-management beta for every other edit."""
edits: Final = context_management.get("edits") if isinstance(context_management, dict) else None
if not isinstance(edits, list):
return frozenset()

View file

@ -350,13 +350,6 @@ def claude_count_options(
context_management: CountContextManagement | None,
deployment: Mapping[str, object] | None,
) -> ClaudeCountOptions | ChatCountTranslationError:
"""The thinking, tool_choice, output_config and context_management a Claude count sends, with the
anthropic-beta values they need, after the deployment's own /v1/messages transform rewrites them.
The transform runs without messages and with a max_tokens above any thinking budget, so it never
caps a budget the caller's real max_tokens would allow. An error it raises is the error inference
answers for the same body.
"""
sent: Final = {
**{name: value for name, value in request_options.items() if value is not None},
**({} if context_management is None else {"context_management": context_management.spec}),

View file

@ -942,8 +942,6 @@ async def test_counter_sends_the_options_and_context_edits_messages_inference_se
request_options: dict[str, JsonValue],
context_management: dict[str, JsonValue] | None,
) -> None:
"""A /v1/messages count that drops thinking, tool_choice, output_config or context_management
counts a different prompt than inference bills, so it carries them the way inference sends them."""
inference: Final = await _messages_inference_request(
counter_type,
count_endpoint.removesuffix("/count_tokens"),

View file

@ -389,8 +389,6 @@ async def _messages_inference_and_count(deployment_model: str, model_to_use: str
async def test_runtime_count_sends_the_options_and_context_edits_invoke_inference_sends(
deployment_model: str, model_to_use: str
) -> None:
"""Bedrock invoke inference drops edits InvokeModel rejects and sends its betas in the body, so a count
that skips either counts a prompt inference never sends, or gets the 400 inference avoids."""
inference, bedrock = await _messages_inference_and_count(deployment_model, model_to_use)
assert bedrock.posted_hosts() == (RUNTIME_HOST,)