Download crates/forge_config/src/reasoning.rs from SaylorTwift/forgecode: direct link, hf CLI and curl.
- Browser
- Download file 2.12 kB
-
https://huggingface.co/SaylorTwift/forgecode/resolve/main/crates/forge_config/src/reasoning.rs
- Command line
-
hf download hf://SaylorTwift/forgecode/crates/forge_config/src/reasoning.rs
-
curl -L -o reasoning.rs https://huggingface.co/SaylorTwift/forgecode/resolve/main/crates/forge_config/src/reasoning.rs
2.12 kB
| use derive_setters::Setters; | |
| use schemars::JsonSchema; | |
| use serde::{Deserialize, Serialize}; | |
| use strum_macros::Display as StrumDisplay; | |
| /// Controls the reasoning behaviour of a model, including effort level, token | |
| /// budget, and visibility of the thinking process. | |
| pub struct ReasoningConfig { | |
| /// Controls the effort level of the model's reasoning. | |
| /// Supported by openrouter and forge provider. | |
| pub effort: Option<Effort>, | |
| /// Controls how many tokens the model can spend thinking. | |
| /// Should be greater than 1024 but less than the overall max_tokens. | |
| /// Supported by openrouter, anthropic, and forge provider. | |
| pub max_tokens: Option<usize>, | |
| /// When true, the model thinks deeply but the reasoning is hidden from the | |
| /// caller. Supported by openrouter and forge provider. | |
| pub exclude: Option<bool>, | |
| /// Enables reasoning at the "medium" effort level with no exclusions. | |
| /// Supported by openrouter, anthropic, and forge provider. | |
| pub enabled: Option<bool>, | |
| } | |
| /// Effort level for model reasoning. | |
| pub enum Effort { | |
| /// No reasoning; skips the thinking step entirely. | |
| None, | |
| /// Minimal reasoning; fastest and cheapest. | |
| Minimal, | |
| /// Low reasoning effort. | |
| Low, | |
| /// Medium reasoning effort; the default for most providers. | |
| Medium, | |
| /// High reasoning effort. | |
| High, | |
| /// Extra-high reasoning effort (OpenAI / OpenRouter). | |
| XHigh, | |
| /// Maximum reasoning effort; only available on select Anthropic models. | |
| Max, | |
| } | |