Get the maximum output tokens for a model, capped at OUTPUT_TOKEN_MAX.
(model: &models::ModelInfo)
| 762 | |
| 763 | /// Get the maximum output tokens for a model, capped at OUTPUT_TOKEN_MAX. |
| 764 | pub 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 |
nothing calls this directly
no outgoing calls
no test coverage detected