mirror of
https://github.com/langgenius/dify-plugin-sdks.git
synced 2026-07-21 18:05:30 -04:00
[PR #275] [MERGED] Make validate_credentials max_tokens configurable (preserve stream default 10) #279
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/275
Author: @Yeuoly
Created: 12/27/2025
Status: ✅ Merged
Merged: 12/29/2025
Merged by: @Yeuoly
Base:
main← Head:codex/make-max_tokens-configurable-s3iofr📝 Commits (1)
13eac2dRevert SDK version bump📊 Changes
1 file changed (+9 additions, -2 deletions)
View changed files
📝
python/dify_plugin/interfaces/model/openai_compatible/llm.py(+9 -2)📄 Description
Motivation
max_tokensused during credentials validation must be configurable.max_tokens=10to ensure a token chunk is emitted, so that behavior should be preserved by default.pyproject.tomlversion bump as requested to avoid changing the published SDK version.Description
validate_credentials_max_tokensfromcredentialsand use it as the pingmax_tokensfor non-stream validation inpython/dify_plugin/interfaces/model/openai_compatible/llm.pywith a default fallback of5.max_tokens=10but allow override whenvalidate_credentials_max_tokensis explicitly provided incredentials, and add an inline comment explaining the rationale.llm.pyto apply the configurable values in both validation flows.python/pyproject.tomlas requested (the lockfile changes were not reverted here).Testing
python/dify_plugin/interfaces/model/openai_compatible/llm.pyandpython/pyproject.toml(revert).git commit) were used to record the change and no runtime validation was performed.Codex Task
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.