Project
cortex
Description
At runtime, cortex run prints warnings to stderr when certain sampling parameters are used together:
--temperature + --top-p: Using both … may produce unpredictable results … recommend using only one sampling parameter at a time.
--temperature + --top-k: Combining --temperature with --top-k may not be supported by all model providers …
Those strings appear in RunCli::run (execution.rs) but are not reflected in cortex run --help.
--temperature and --top-p doc lines say nothing about mutual exclusivity or provider guidance.
--top-k’s doc comment only notes “Not all providers support combining --top-k with --temperature” (cli.rs), which partially overlaps the second warning but does not match its wording, omits API error guidance, and says nothing about --temperature + --top-p.
Users who read --help alone may be surprised the first time they see the yellow warnings after a successful parse.
Error Message
Debug Logs
System Information
Screenshots
https://github.com/chris-dev777/image/blob/main/86.png
Steps to Reproduce
Read cortex run --help for --temperature, --top-p, --top-k.
Run cortex run (e.g. --dry-run) with all three flags set to valid values.
Compare help text to the warnings printed before normal output.
Expected Behavior
--help summarizes the same compatibility expectations as runtime (or points to docs), including temperature + top-p and temperature + top-k, so users are not surprised by stderr warnings.
Actual Behavior
Warnings exist only at run time; --help does not document the temperature/top-p pairing, and only partially hints at temperature/top-k via the --top-k field doc.
Additional Context
In src/cortex-cli/src/run_cmd/execution.rs, the runtime warnings are clearly present:
// Warn if both temperature and top-p are specified (#2175)
if self.temperature.is_some() && self.top_p.is_some() {
eprintln!(
"{}Warning:{} Using both --temperature and --top-p together may produce unpredictable results.
Most LLM providers recommend using only one sampling parameter at a time.",
TermColor::Yellow.ansi_code(),
TermColor::Default.ansi_code()
);
}
// Warn about potential parameter compatibility issues
if self.temperature.is_some() && self.top_k.is_some() {
eprintln!(
"Warning: Combining --temperature with --top-k may not be supported by all model providers. \
If you encounter API errors, try using only one of these parameters."
);
}
In src/cortex-cli/src/run_cmd/cli.rs, the help text for these parameters does not fully reflect these warnings:
/// Model temperature (0.0-2.0).
/// Lower values make output more deterministic.
#[arg(short = 't', long = "temperature")]
pub temperature: Option,
/// Top-p (nucleus) sampling parameter.
/// Controls diversity of token selection.
#[arg(long = "top-p")]
pub top_p: Option<f32>,
/// Top-k sampling parameter.
/// Limits token selection to k most probable tokens.
/// Note: Not all providers support combining --top-k with --temperature.
#[arg(long = "top-k")]
pub top_k: Option<u32>,
As reported, --temperature and --top-p have no mention of mutual exclusivity, and --top-k only has a partial note that doesn't match the runtime warning's wording or mention API errors.
Project
cortex
Description
At runtime, cortex run prints warnings to stderr when certain sampling parameters are used together:
--temperature + --top-p: Using both … may produce unpredictable results … recommend using only one sampling parameter at a time.
--temperature + --top-k: Combining --temperature with --top-k may not be supported by all model providers …
Those strings appear in RunCli::run (execution.rs) but are not reflected in cortex run --help.
--temperature and --top-p doc lines say nothing about mutual exclusivity or provider guidance.
--top-k’s doc comment only notes “Not all providers support combining --top-k with --temperature” (cli.rs), which partially overlaps the second warning but does not match its wording, omits API error guidance, and says nothing about --temperature + --top-p.
Users who read --help alone may be surprised the first time they see the yellow warnings after a successful parse.
Error Message
Debug Logs
System Information
Screenshots
https://github.com/chris-dev777/image/blob/main/86.png
Steps to Reproduce
Read cortex run --help for --temperature, --top-p, --top-k.
Run cortex run (e.g. --dry-run) with all three flags set to valid values.
Compare help text to the warnings printed before normal output.
Expected Behavior
--help summarizes the same compatibility expectations as runtime (or points to docs), including temperature + top-p and temperature + top-k, so users are not surprised by stderr warnings.
Actual Behavior
Warnings exist only at run time; --help does not document the temperature/top-p pairing, and only partially hints at temperature/top-k via the --top-k field doc.
Additional Context
In src/cortex-cli/src/run_cmd/execution.rs, the runtime warnings are clearly present:
// Warn if both temperature and top-p are specified (#2175)
if self.temperature.is_some() && self.top_p.is_some() {
eprintln!(
"{}Warning:{} Using both --temperature and --top-p together may produce unpredictable results.
Most LLM providers recommend using only one sampling parameter at a time.",
TermColor::Yellow.ansi_code(),
TermColor::Default.ansi_code()
);
}
In src/cortex-cli/src/run_cmd/cli.rs, the help text for these parameters does not fully reflect these warnings:
/// Model temperature (0.0-2.0).
/// Lower values make output more deterministic.
#[arg(short = 't', long = "temperature")]
pub temperature: Option,
As reported, --temperature and --top-p have no mention of mutual exclusivity, and --top-k only has a partial note that doesn't match the runtime warning's wording or mention API errors.