dify/api/core/model_runtime/model_providers
-LAN- 559ab46ee1
fix: Removes redundant token calculations and updates dependencies
Eliminates unnecessary pre-calculation of token limits and recalculation of max tokens
across multiple app runners, simplifying the logic for prompt handling.

Updates tiktoken library from version 0.8.0 to 0.9.0 for improved tokenization performance.

Increases default token limit in TokenBufferMemory to accommodate larger prompt messages.

These changes streamline the token management process and leverage the latest
improvements in the tiktoken library.

Fixes potential token overflow issues and prepares the system for handling larger
inputs more efficiently.

Relates to internal optimization tasks.

Signed-off-by: -LAN- <laipz8200@outlook.com>
2025-04-28 15:39:12 +08:00
..
__base chore(*): Update style of thinking (#13319) 2025-02-07 14:06:35 +08:00
anthropic fix: handle document fetching from URL in Anthropic LLM model, solving base64 decoding error (#11858) 2024-12-20 18:23:42 +08:00
azure_ai_studio feat: add completion mode and context size options for LLM configuration (#13325) 2025-02-07 15:08:53 +08:00
azure_openai feat: Add o3-mini and o3-mini-2025-01-31 model variants (#13129) 2025-02-05 17:04:45 +08:00
baichuan fix: volcengine_maas and baichuan message error (#11625) 2024-12-16 13:05:27 +08:00
bedrock add bedrock deepseek-r1 (#18908) 2025-04-27 19:30:42 +08:00
chatglm chore: refurbish Python code by applying refurb linter rules (#8296) 2024-09-12 15:50:49 +08:00
cohere refactor: avoid to use extra space when finding model by name (#13043) 2025-01-30 15:08:29 +08:00
deepseek fix: correct linewrap think display in generic openai api (#13260) 2025-02-06 10:53:08 +08:00
fireworks feat: mypy for all type check (#10921) 2024-12-24 18:38:51 +08:00
fishaudio fix: fish audio wrong validate credentials interface (#11019) 2024-11-23 23:39:41 +08:00
gitee_ai fix: Update the API call address for the text_embedding model (#12342) 2025-01-03 19:19:17 +08:00
google fix: change gemini-2.0-flash to validate google api #17082 (#17115) 2025-03-30 13:04:12 +08:00
gpustack Support TTS and Speech2Text for Model Provider GPUStack (#12381) 2025-01-07 09:42:11 +08:00
groq feat(model_providers): Add Groq DeepSeek-R1-Distill-Llama-70b (#13229) 2025-02-05 19:15:29 +08:00
huggingface_hub chore(lint): fix quotes for f-string formatting by bumping ruff to 0.9.x (#12702) 2025-01-21 10:12:29 +08:00
huggingface_tei fix: fix typo (#12034) 2024-12-24 15:23:27 +08:00
hunyuan feat:Add support for stop parameter in hunyuan model #12313 (#12315) 2025-01-03 09:15:04 +08:00
jina feat: mypy for all type check (#10921) 2024-12-24 18:38:51 +08:00
leptonai chore(api/core): apply ruff reformatting (#7624) 2024-09-10 17:00:20 +08:00
localai chore: format get_customizable_model_schema return value (#9335) 2024-10-21 19:05:44 +08:00
minimax feat:Support Minimax-Text-01 (#12763) 2025-01-21 10:08:53 +08:00
mistralai [Pixtral] Add new model ; add vision (#11231) 2024-12-11 10:14:16 +08:00
mixedbread refactor: move the embedding to the rag module and abstract the rerank runner for extension (#9423) 2024-10-17 19:12:42 +08:00
moonshot fix: DeepSeek API Error with response format active (text and json_object) (#12747) 2025-01-20 22:04:18 +08:00
nomic feat: mypy for all type check (#10921) 2024-12-24 18:38:51 +08:00
novita Fixed Novita AI color and added DeepSeek R1 model (#13074) 2025-01-28 10:38:54 +08:00
nvidia feat(model_providers): Support deepseek-r1 for Nvidia Catalog (#13269) 2025-02-06 13:03:19 +08:00
nvidia_nim chore(api/core): apply ruff reformatting (#7624) 2024-09-10 17:00:20 +08:00
oci Upgrade oracle models (#13174) 2025-02-06 13:24:27 +08:00
ollama chore:improve thinking display for llm from xinference and ollama pro… (#13318) 2025-02-07 14:29:29 +08:00
openai fix: Removes redundant token calculations and updates dependencies 2025-04-28 15:39:12 +08:00
openai_api_compatible chore: refactor the OpenAICompatible and improve thinking display (#13299) 2025-02-07 13:28:46 +08:00
openllm feat: mypy for all type check (#10921) 2024-12-24 18:38:51 +08:00
openrouter feat(model): add deepseek-r1 for openrouter (#13312) 2025-02-07 12:39:13 +08:00
perfxcloud refactor: reduce duplciate code by inheritance (#13073) 2025-01-28 10:52:01 +08:00
replicate feat: mypy for all type check (#10921) 2024-12-24 18:38:51 +08:00
sagemaker [Fix] revert sagemaker llm to support model hub (#12378) 2025-01-06 18:01:45 +08:00
siliconflow fix: correct linewrap think display in generic openai api (#13260) 2025-02-06 10:53:08 +08:00
spark fix: SparkLite API Auth error (#12781) (#12790) 2025-01-20 22:21:21 +08:00
stepfun fix: #12143 support streaming mode content start with "data:" (#12171) 2025-01-03 16:33:37 +08:00
tencent chore: refurbish Python code by applying refurb linter rules (#8296) 2024-09-12 15:50:49 +08:00
togetherai feat: mypy for all type check (#10921) 2024-12-24 18:38:51 +08:00
tongyi add tongyi qwen2.5-14b/7b-instruct-1m model (#13089) 2025-01-29 11:58:01 +08:00
triton_inference_server chore(lint): fix quotes for f-string formatting by bumping ruff to 0.9.x (#12702) 2025-01-21 10:12:29 +08:00
upstage feat: mypy for all type check (#10921) 2024-12-24 18:38:51 +08:00
vertex_ai fix: fix vertex gemini 2.0 flash 001 schema (#18405) 2025-04-19 22:04:13 +08:00
vessl_ai feat: mypy for all type check (#10921) 2024-12-24 18:38:51 +08:00
volcengine_maas feat: add deepseek models for volcengine provider (#13283) 2025-02-06 18:20:03 +08:00
voyage fix: int None will cause error for context size (#11055) 2024-11-25 21:04:16 +08:00
wenxin chore(lint): fix quotes for f-string formatting by bumping ruff to 0.9.x (#12702) 2025-01-21 10:12:29 +08:00
x feat: add grok-2-1212 and grok-2-vision-1212 (#11672) 2024-12-15 21:18:24 +08:00
xinference chore:improve thinking display for llm from xinference and ollama pro… (#13318) 2025-02-07 14:29:29 +08:00
yi feat: mypy for all type check (#10921) 2024-12-24 18:38:51 +08:00
zhinao chore(api/core): apply ruff reformatting (#7624) 2024-09-10 17:00:20 +08:00
zhipuai feat: add glm-4-air-0111 (#12997) 2025-01-24 10:04:46 +08:00
__init__.py Model Runtime (#1858) 2024-01-02 23:42:00 +08:00
_position.yaml chore(model_runtime): Move deepseek ahead in the providers list. (#13197) 2025-02-05 16:08:28 +08:00
model_provider_factory.py feat: support pinning, including, and excluding for model providers and tools (#7419) 2024-08-21 11:16:43 +08:00