Skip to main content

Module estimates

Module estimates 

Source
Expand description

Context-window and max-output-token estimates for Bedrock models.

Context-window estimates delegate to the canonical crate::provider::limits::context_window_for_model so a single map covers all providers. Max-output estimates are Bedrock-specific (they vary by inference-profile, not by model family) and live here.

§Examples

use codetether_agent::provider::bedrock::{estimate_context_window, estimate_max_output};

assert_eq!(estimate_context_window("us.anthropic.claude-opus-4-7"), 1_000_000);
assert_eq!(estimate_max_output("us.anthropic.claude-opus-4-7"), 128_000);
assert_eq!(estimate_context_window("amazon.nova-lite-v1:0"), 300_000);

Functions§

estimate_context_window
Estimate context-window size (input+output combined) for a Bedrock model.
estimate_max_output
Estimate max completion-output tokens for a Bedrock model.