Skip to content

fix(cortex-cli): use consistent provider name casing in models output#137

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

fix(cortex-cli): use consistent provider name casing in models output#137
echobt wants to merge 1 commit intomasterfrom
fix/bounty-issue-1358

Conversation

@echobt
Copy link
Contributor

@echobt echobt commented Jan 26, 2026

Summary

This PR fixes an inconsistency in the cortex models command where provider names were displayed in different cases depending on the output format.

Problem

  • Table output: Provider names in UPPERCASE (e.g., "ANTHROPIC")
  • JSON output: Provider names in lowercase (e.g., "anthropic")

This inconsistency was confusing when comparing outputs across formats.

Changes

  • Removed the .to_uppercase() call in the table output to use consistent lowercase provider names
  • Both table and JSON outputs now display provider names in lowercase, matching the internal data representation

Related

Fixes PlatformNetwork/bounty-challenge#1358

Fixes bounty issue #1358

The models command was showing provider names in UPPERCASE in table output
but lowercase in JSON output. This inconsistency was confusing when comparing
outputs across formats. Now both table and JSON outputs use consistent
lowercase provider names, matching the internal data representation.
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 pushed a commit that referenced this pull request Jan 27, 2026
This commit implements the following 10 open PRs for cortex-cli:

1. PR #155 - Prompt for tab completion setup on first run
   - Added completion_setup module for first-run completion detection
   - On first interactive run, prompts user to enable tab completion
   - Automatically detects shell (bash, zsh, fish, PowerShell, elvish)
   - Creates marker file to avoid repeated prompts

2. PR #153 - Emit valid JSONL with full event data in streaming mode
   - Already implemented in previous work

3. PR #151 - Add man page generation command
   - Added clap_mangen dependency
   - Added 'man' command with optional output directory
   - Generates roff-format man pages

4. PR #137 - Use consistent provider name casing in models output
   - Already using lowercase provider names (no changes needed)

5. PR #134 - Check actual write permission for current user in debug file
   - Added is_writable_by_current_user() helper function
   - Uses actual file open test instead of permission bits

6. PR #133 - Detect actual binary location from PATH for uninstall dry-run
   - Added 'which' dependency for PATH lookup
   - Updated collect_binary_locations() to use PATH search first

7. PR #130 - Show searched paths in debug ripgrep output
   - Added searched_paths field to RipgrepDebugOutput
   - Added get_path_directories() helper function
   - Shows PATH directories when ripgrep is not found

8. PR #129 - Output valid JSON on errors when --json flag is set
   - Updated run_servers() to handle MdnsBrowser errors as JSON
   - Move discovery banner inside conditional for non-JSON mode

9. PR #126 - Add batch export for sessions
   - Added --all (-a) flag for batch export mode
   - Added --output-dir option for batch exports
   - Each session exported to separate JSON file

10. PR #124 - Display feature descriptions in features list
    - Updated list_features() to use actual feature registry
    - Added Description column to features list output

11. PR #122 - Add debug system command for system information
    - Added System subcommand to debug CLI
    - Gathers OS, hardware, environment, and Cortex info
    - Supports JSON output for scripts/automation
echobt added a commit that referenced this pull request Jan 27, 2026
This commit implements the following 10 open PRs for cortex-cli:

1. PR #155 - Prompt for tab completion setup on first run
   - Added completion_setup module for first-run completion detection
   - On first interactive run, prompts user to enable tab completion
   - Automatically detects shell (bash, zsh, fish, PowerShell, elvish)
   - Creates marker file to avoid repeated prompts

2. PR #153 - Emit valid JSONL with full event data in streaming mode
   - Already implemented in previous work

3. PR #151 - Add man page generation command
   - Added clap_mangen dependency
   - Added 'man' command with optional output directory
   - Generates roff-format man pages

4. PR #137 - Use consistent provider name casing in models output
   - Already using lowercase provider names (no changes needed)

5. PR #134 - Check actual write permission for current user in debug file
   - Added is_writable_by_current_user() helper function
   - Uses actual file open test instead of permission bits

6. PR #133 - Detect actual binary location from PATH for uninstall dry-run
   - Added 'which' dependency for PATH lookup
   - Updated collect_binary_locations() to use PATH search first

7. PR #130 - Show searched paths in debug ripgrep output
   - Added searched_paths field to RipgrepDebugOutput
   - Added get_path_directories() helper function
   - Shows PATH directories when ripgrep is not found

8. PR #129 - Output valid JSON on errors when --json flag is set
   - Updated run_servers() to handle MdnsBrowser errors as JSON
   - Move discovery banner inside conditional for non-JSON mode

9. PR #126 - Add batch export for sessions
   - Added --all (-a) flag for batch export mode
   - Added --output-dir option for batch exports
   - Each session exported to separate JSON file

10. PR #124 - Display feature descriptions in features list
    - Updated list_features() to use actual feature registry
    - Added Description column to features list output

11. PR #122 - Add debug system command for system information
    - Added System subcommand to debug CLI
    - Gathers OS, hardware, environment, and Cortex info
    - Supports JSON output for scripts/automation

Co-authored-by: Droid Agent <droid@factory.ai>
echobt pushed a commit that referenced this pull request Jan 27, 2026
Complete the model alias feature (PR #138) by adding support to
the ACP server command. This ensures consistent model alias
resolution (e.g., 'sonnet' -> 'anthropic/claude-sonnet-4-20250514')
across all CLI entry points.

This was the only missing piece from the 10 open CLI PRs, as all
other features were already implemented in the current codebase:
- PR #155: Tab completion setup on first run
- PR #153: Valid JSONL with full event data
- PR #151: Man page generation command
- PR #138: Model alias shortcuts (now complete)
- PR #137: Consistent provider casing
- PR #135: --log-level flag
- PR #134: Actual write permission check
- PR #133: Binary location from PATH
- PR #130: Searched paths in ripgrep debug
- PR #129: Valid JSON output on errors
echobt added a commit that referenced this pull request Jan 27, 2026
Complete the model alias feature (PR #138) by adding support to
the ACP server command. This ensures consistent model alias
resolution (e.g., 'sonnet' -> 'anthropic/claude-sonnet-4-20250514')
across all CLI entry points.

This was the only missing piece from the 10 open CLI PRs, as all
other features were already implemented in the current codebase:
- PR #155: Tab completion setup on first run
- PR #153: Valid JSONL with full event data
- PR #151: Man page generation command
- PR #138: Model alias shortcuts (now complete)
- PR #137: Consistent provider casing
- PR #135: --log-level flag
- PR #134: Actual write permission check
- PR #133: Binary location from PATH
- PR #130: Searched paths in ripgrep debug
- PR #129: Valid JSON output on errors

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 commits 6c8cccf (PR #182) and 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] models output shows provider names in different cases

2 participants