mirror of
https://github.com/langgenius/dify-plugin-sdks.git
synced 2026-07-21 18:05:30 -04:00
[PR #260] fix: use configurable max_tokens in credential validation instead of hardcoded value #267
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/langgenius/dify-plugin-sdks/pull/260
Author: @huayaoyue6
Created: 12/7/2025
Status: 🔄 Open
Base:
main← Head:main📝 Commits (1)
f4064c0fix: use configurable max_tokens in credential validation instead of hardcoded value📊 Changes
1 file changed (+2 additions, -1 deletions)
View changed files
📝
python/dify_plugin/interfaces/model/openai_compatible/llm.py(+2 -1)📄 Description
The
validate_credentialsmethod inOAICompatLargeLanguageModeluses a hardcodedmax_tokens: 5value when testing model connectivity. This can cause credential validation failures for models that have minimum token requirements higher than 5, even when the credentials are correct.Pull Request Checklist
Thank you for your contribution! Before submitting your PR, please make sure you have completed the following checks:
Compatibility Check
README.mdREADME.mdREADME.mdREADME.mdAvailable Checks
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.