MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / max_output_tokens

Function max_output_tokens

crates/opencode-provider/src/transform.rs:764–771  ·  view source on GitHub ↗

Get the maximum output tokens for a model, capped at OUTPUT_TOKEN_MAX.

(model: &models::ModelInfo)

Source from the content-addressed store, hash-verified

762
763/// Get the maximum output tokens for a model, capped at OUTPUT_TOKEN_MAX.
764pub fn max_output_tokens(model: &models::ModelInfo) -> u64 {
765 let capped = model.limit.output.min(OUTPUT_TOKEN_MAX);
766 if capped == 0 {
767 OUTPUT_TOKEN_MAX
768 } else {
769 capped
770 }
771}
772
773// ---------------------------------------------------------------------------
774// sdk_key

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected