Skip to content

[GUI] createProvider sends duplicate camelCase and snake_case fields #65

@Vantalens

Description

@Vantalens

File: packages/gui/src/daemon-client/client.ts:478

Severity: High

Description:
Sends providerType + provider_type, apiKey + api_key, apiBase + api_base; API may reject duplicate fields or use wrong one depending on parsing order, causing config corruption.

Code:

await client.createProvider({
  name: providerName,
  providerType,
  provider_type: providerType,
  apiKey,
  api_key: apiKey,
  apiBase,
  api_base: apiBase,
});

Failure Scenario:

  • User adds new provider
  • Payload contains both naming conventions for every field
  • Rust daemon may:
    • Reject as invalid (duplicate field error)
    • Parse one and ignore the other (undefined precedence)
    • Store corrupted config mixing both conventions
  • Provider creation fails or behaves inconsistently

Suggested Fix:
Align with daemon API contract, send only one naming convention per field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingguiGUI/frontend related issueshigh-priorityHigh priority issuesjavascriptPull requests that update javascript code

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions