Skip to content

[CLI] config --json returns provider display names instead of stable keys #205

Description

@404-Page-Found

Description

The JSON output for commit-echo config --json is described in code as script-friendly, but the provider field is currently rendered as a human-facing label like OpenAI or Custom (OpenAI-compatible) rather than the saved provider key.

Location

  • src/commands/config.ts:112
  • src/commands/config.ts:124

Problematic code

function formatProvider(config: Config): string {
provider: formatProvider(config),

Suggested fix

Return the raw provider key in JSON output and keep the friendly label only for interactive CLI output. If backward compatibility matters, an additional field such as providerLabel could preserve both forms.

Impact

Scripts cannot reliably round-trip or compare provider values against config keys.

Metadata

Metadata

Assignees

Labels

Type

Fields

No fields configured for Task.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions