fix(engine): pass CLI temperature override to session#139
fix(engine): pass CLI temperature override to session#139
Conversation
Fixes bounty issue #1502 The --temperature CLI flag was being validated but never passed to the session's CompletionRequest. This fix: 1. Adds temperature field to Config and ConfigOverrides structs 2. Passes temperature from run_cmd.rs to ConfigOverrides 3. Uses config.temperature in session.rs instead of hardcoded 0.7 Now CLI temperature overrides take precedence, falling back to 0.7 if not specified.
Blacksmith Account SuspendedThis Blacksmith account requires additional verification. Jobs targeting Blacksmith runners will not be picked up and will remain queued until they timeout. Please contact Blacksmith Support for assistance. |
10 similar comments
Blacksmith Account SuspendedThis Blacksmith account requires additional verification. Jobs targeting Blacksmith runners will not be picked up and will remain queued until they timeout. Please contact Blacksmith Support for assistance. |
Blacksmith Account SuspendedThis Blacksmith account requires additional verification. Jobs targeting Blacksmith runners will not be picked up and will remain queued until they timeout. Please contact Blacksmith Support for assistance. |
Blacksmith Account SuspendedThis Blacksmith account requires additional verification. Jobs targeting Blacksmith runners will not be picked up and will remain queued until they timeout. Please contact Blacksmith Support for assistance. |
Blacksmith Account SuspendedThis Blacksmith account requires additional verification. Jobs targeting Blacksmith runners will not be picked up and will remain queued until they timeout. Please contact Blacksmith Support for assistance. |
Blacksmith Account SuspendedThis Blacksmith account requires additional verification. Jobs targeting Blacksmith runners will not be picked up and will remain queued until they timeout. Please contact Blacksmith Support for assistance. |
Blacksmith Account SuspendedThis Blacksmith account requires additional verification. Jobs targeting Blacksmith runners will not be picked up and will remain queued until they timeout. Please contact Blacksmith Support for assistance. |
Blacksmith Account SuspendedThis Blacksmith account requires additional verification. Jobs targeting Blacksmith runners will not be picked up and will remain queued until they timeout. Please contact Blacksmith Support for assistance. |
Blacksmith Account SuspendedThis Blacksmith account requires additional verification. Jobs targeting Blacksmith runners will not be picked up and will remain queued until they timeout. Please contact Blacksmith Support for assistance. |
Blacksmith Account SuspendedThis Blacksmith account requires additional verification. Jobs targeting Blacksmith runners will not be picked up and will remain queued until they timeout. Please contact Blacksmith Support for assistance. |
Blacksmith Account SuspendedThis Blacksmith account requires additional verification. Jobs targeting Blacksmith runners will not be picked up and will remain queued until they timeout. Please contact Blacksmith Support for assistance. |
This commit implements improvements from multiple CLI-related PRs: 1. PR #137: Use consistent provider name casing in models output - Removed .to_uppercase() call to keep provider names in lowercase 2. PR #135: Add --log-level flag for granular log verbosity control - Added LogLevel enum with error, warn, info, debug, trace levels - Support for FABRIC_LOG_LEVEL environment variable - Deprecated --debug flag (still works for backward compatibility) 3. PR #147: Display timestamps with timezone suffix - Sessions list now shows timestamps in "YYYY-MM-DD HH:MM:SS UTC" format - Makes timezone unambiguous for team collaboration 4. PR #153: Emit valid JSONL with full event data in streaming mode - Serialize full event using serde with proper type tags - Include complete event payload data (text deltas, tool call info) 5. PR #138: Add model alias shortcuts for common models - Added ModelAlias struct and MODEL_ALIASES constant - resolve_model_alias() function for short name resolution - Supported aliases: sonnet, opus, haiku, gpt4, gpt, o1, o3, codex, gemini, deepseek, r1, llama - Case-insensitive matching 6. PR #139: Pass CLI temperature override to session - Added temperature field to Config and ConfigOverrides - Modified session.rs to use config.temperature instead of hardcoded 0.7 - Temperature can be set via cortex run --temperature flag Also includes formatting improvements from cargo fmt.
This commit implements improvements from multiple CLI-related PRs: 1. PR #137: Use consistent provider name casing in models output - Removed .to_uppercase() call to keep provider names in lowercase 2. PR #135: Add --log-level flag for granular log verbosity control - Added LogLevel enum with error, warn, info, debug, trace levels - Support for FABRIC_LOG_LEVEL environment variable - Deprecated --debug flag (still works for backward compatibility) 3. PR #147: Display timestamps with timezone suffix - Sessions list now shows timestamps in "YYYY-MM-DD HH:MM:SS UTC" format - Makes timezone unambiguous for team collaboration 4. PR #153: Emit valid JSONL with full event data in streaming mode - Serialize full event using serde with proper type tags - Include complete event payload data (text deltas, tool call info) 5. PR #138: Add model alias shortcuts for common models - Added ModelAlias struct and MODEL_ALIASES constant - resolve_model_alias() function for short name resolution - Supported aliases: sonnet, opus, haiku, gpt4, gpt, o1, o3, codex, gemini, deepseek, r1, llama - Case-insensitive matching 6. PR #139: Pass CLI temperature override to session - Added temperature field to Config and ConfigOverrides - Modified session.rs to use config.temperature instead of hardcoded 0.7 - Temperature can be set via cortex run --temperature flag Also includes formatting improvements from cargo fmt. Co-authored-by: Droid Agent <droid@factory.ai>
Summary
Fixes the issue where per-run prompt overrides like
--temperaturewere being ignored when runningcortex run --temperature 0.1.Problem
The
--temperatureCLI flag was being validated but never passed through to the session'sCompletionRequest. The temperature value was hardcoded to 0.7 in the session loop.Changes
temperaturefield toConfigstruct incortex-engine/src/config/mod.rstemperaturefield toConfigOverridesstruct to allow CLI overridesrun_cmd.rsto pass the CLI temperature toConfigOverridessession.rsto useconfig.temperatureinstead of hardcoded 0.7Behavior
Related
Fixes PlatformNetwork/bounty-challenge#1502