Skip to content

fix(cli): use openai_compat instead of openai-compat in provider setup#1062

Open
wucm667 wants to merge 1 commit into
nextlevelbuilder:devfrom
wucm667:fix/provider-type-mismatch
Open

fix(cli): use openai_compat instead of openai-compat in provider setup#1062
wucm667 wants to merge 1 commit into
nextlevelbuilder:devfrom
wucm667:fix/provider-type-mismatch

Conversation

@wucm667
Copy link
Copy Markdown

@wucm667 wucm667 commented Apr 28, 2026

Fixes #1046

Problem

The CLI setup wizard (goclaw setup) and providers add command display openai-compat as the provider type, but the HTTP API (/v1/providers) and database validation expect openai_compat (underscore).

This mismatch causes provider creation to fail during the setup process.

Solution

Change openai-compat to openai_compat in the CLI provider type definitions to match the internal constant store.ProviderOpenAICompat.

Changes

  • cmd/setup_provider.go: Updated provider type mapping and check
  • cmd/providers_cmd.go: Updated provider type mapping and check

The CLI setup wizard and 'providers add' command were using
'openai-compat' (hyphen), but the API and database expect
'openai_compat' (underscore), causing provider creation to fail.

Fixes nextlevelbuilder#1046
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: Failed to configure providerType in the goclaw CLI.

1 participant