Skip to content

OpenAI-API-compatible provider keeps broken Perplexity Sonar credentials and validation fails #36386

@fukayanozomifb4-maker

Description

@fukayanozomifb4-maker

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.14.1

Cloud or Self Hosted

Cloud

Steps to reproduce

  1. Add Perplexity Sonar models using OpenAI-API-compatible provider
  2. Delete or modify credentials
  3. Try reopening credential configuration
  4. Reinstall provider
  5. Try adding a new Sonar model

✔️ Expected Behavior

Credentials should delete correctly and deleted models should not reappear after reinstalling the provider.

Validation for newly added Sonar models should succeed with valid max token settings.

❌ Actual Behavior

Using the OpenAI-API-compatible provider with Perplexity Sonar models causes broken credential references.

Deleted credentials cannot be removed because Dify says they are still in use, but opening the credential configuration shows:
"Credential with id xxx not found"

Additionally, reinstalling the provider causes deleted Sonar models to reappear automatically.

Trying to add a new Sonar model with a new credential also fails validation incorrectly with:
"max_tokens must be at least 16 for sonar"

even though max tokens is set properly.

This issue may indicate orphaned credential references remaining in the workspace state after model/provider deletion.

Image Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions