Skip to content

fix(engine): pass CLI temperature override to session#139

Closed
echobt wants to merge 1 commit intomasterfrom
fix/bounty-issue-1502
Closed

fix(engine): pass CLI temperature override to session#139
echobt wants to merge 1 commit intomasterfrom
fix/bounty-issue-1502

Conversation

@echobt
Copy link
Contributor

@echobt echobt commented Jan 26, 2026

Summary

Fixes the issue where per-run prompt overrides like --temperature were being ignored when running cortex run --temperature 0.1.

Problem

The --temperature CLI flag was being validated but never passed through to the session's CompletionRequest. The temperature value was hardcoded to 0.7 in the session loop.

Changes

  • Added temperature field to Config struct in cortex-engine/src/config/mod.rs
  • Added temperature field to ConfigOverrides struct to allow CLI overrides
  • Modified run_cmd.rs to pass the CLI temperature to ConfigOverrides
  • Modified session.rs to use config.temperature instead of hardcoded 0.7

Behavior

  • CLI temperature override takes precedence when provided
  • Falls back to default 0.7 if no temperature is specified

Related

Fixes PlatformNetwork/bounty-challenge#1502

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-sh
Copy link

blacksmith-sh bot commented Jan 26, 2026

Blacksmith Account Suspended

This 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-sh
Copy link

blacksmith-sh bot commented Jan 26, 2026

Blacksmith Account Suspended

This 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-sh
Copy link

blacksmith-sh bot commented Jan 26, 2026

Blacksmith Account Suspended

This 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-sh
Copy link

blacksmith-sh bot commented Jan 26, 2026

Blacksmith Account Suspended

This 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-sh
Copy link

blacksmith-sh bot commented Jan 26, 2026

Blacksmith Account Suspended

This 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-sh
Copy link

blacksmith-sh bot commented Jan 26, 2026

Blacksmith Account Suspended

This 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-sh
Copy link

blacksmith-sh bot commented Jan 26, 2026

Blacksmith Account Suspended

This 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-sh
Copy link

blacksmith-sh bot commented Jan 26, 2026

Blacksmith Account Suspended

This 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-sh
Copy link

blacksmith-sh bot commented Jan 26, 2026

Blacksmith Account Suspended

This 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-sh
Copy link

blacksmith-sh bot commented Jan 26, 2026

Blacksmith Account Suspended

This 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-sh
Copy link

blacksmith-sh bot commented Jan 26, 2026

Blacksmith Account Suspended

This 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.

echobt pushed a commit that referenced this pull request Jan 27, 2026
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.
echobt added a commit that referenced this pull request Jan 27, 2026
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>
@echobt
Copy link
Contributor Author

echobt commented Jan 27, 2026

Closing: this feature has already been implemented in commit beededb (PR #181).

@echobt echobt closed this Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Agent Default Parameters Override Prompt-Specific Overrides

2 participants