Skip to content

[BUG] 'Unknown model platform: zhipu' error when configuring Z.ai as BYOK custom model #1556

@supermomonga

Description

@supermomonga

What version of eigent are you using?

latest (as of 2026-04-13)

System information

Reproducible on macOS and Linux (please specify actual environment if different). Happens when setting a Z.ai API key as a BYOK provider in Eigent's model configuration UI.

Problem description

Short Description:
When attempting to configure a custom model for Z.ai (zhipu), validation fails with the error message: 'Unknown model platform: zhipu'.

Expected behavior:
The model platform should be recognized, and API key validation should complete successfully if credentials and endpoint are correct.

Actual behavior:
Regardless of API key or URL, configuration fails and returns the error: 'Unknown model platform: zhipu'.

Repro steps:

  1. Go to Settings > Models (BYOK section)
  2. Choose Z.ai
  3. Enter a valid API key and endpoint
  4. Click Save/Verify
  5. Observe error message in the UI

Relevant error log:

Unknown model platform: zhipu

Note: Z.ai is mapped to 'zhipu' in the backend, but it appears 'zhipu' is not recognized by the camel-ai model backend. This causes validation to always fail.

log

(See error above. Additional logs can be attached if required.)

Additional context

Suspected root cause

  • In backend/app/model/model_platform.py, Z.ai is aliased to 'zhipu'. However, camel-ai ModelFactory (or ModelPlatformType) does not support 'zhipu' as a model platform, leading to the error.
  • Possibly missing mapping or incomplete support for Zhipu in camel-ai backend.

Suggested solution

  • Either update the aliasing so 'z.ai' maps to an OpenAI-compatible platform (if appropriate),
  • OR add explicit support for 'zhipu' in the camel-ai backend if Zhipu models should be supported natively.

Related code reference

  • See the PLATFORM_ALIAS_MAPPING in backend/app/model/model_platform.py

Screenshots

Attach screenshots of the settings page and error message if possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions