Skip to content

Make custom provider ID renames safe or diagnose mismatched references #1638

Closed

Description

@danbarr

Bug description

Renaming a custom provider ID directly in settings.yaml can leave provider configuration, credentials, and default-model references keyed by different IDs. Mecatl then fails startup or treats the renamed provider as unavailable without clearly explaining that the provider's identity-linked records no longer match.

This was reported by a user on Discord who renamed the provider key in settings.yaml. Startup failed after the edit; restoring the original provider ID allowed setup to proceed.

Custom provider credentials are resolved by provider ID, and provider/default selections also refer to that ID. A provider ID therefore behaves as a cross-file identity, but the configuration UX does not make the rename implications or recovery procedure clear.

Steps to reproduce

  1. Add an API-key-authenticated custom provider through mecatui providers add or mecatui providers setup.
  2. Configure it as the embedded default.
  3. Rename only its key under providers: in settings.yaml.
  4. Start Mecatui.

Depending on which references retain the old ID, the renamed provider has no matching credential and/or the configured default points to an unknown provider.

Expected behavior

Mecatl should either provide an atomic supported rename workflow or fail with an actionable diagnostic that identifies the mismatched provider-ID references and gives a safe recovery command.

The user should not need to know which protected credential file and default-selection fields internally share the provider ID.

Actual behavior

A partial rename produces a startup/provider-availability failure, and the relationship between the renamed settings key, stored credential, and default selection is not apparent from the failure.

Environment (if relevant)

  • Deployment shape: embedded Mecatui with a custom API-key provider

Additional context

Reported generically from Discord; provider identity and endpoint omitted. No secrets are included.

This is distinct from documenting the provider-ID grammar. Even a syntactically valid new ID can leave identity-linked configuration inconsistent.

Activity

  1. self-assigned this
    on Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions