Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: Claude can not validate credientials (#8109)

crazywoolaab7d79275e56
diff --git a/api/core/model_runtime/model_providers/anthropic/anthropic.py b/api/core/model_runtime/model_providers/anthropic/anthropic.py
index 00a6bbce3b5..325c6c060ef 100644
--- a/api/core/model_runtime/model_providers/anthropic/anthropic.py
+++ b/api/core/model_runtime/model_providers/anthropic/anthropic.py
@@ -19,9 +19,9 @@ class AnthropicProvider(ModelProvider):
try:
model_instance = self.get_model_instance(ModelType.LLM)
- # Use `claude-instant-1` model for validate,
+ # Use `claude-3-opus-20240229` model for validate,
model_instance.validate_credentials(
- model='claude-instant-1.2',
+ model='claude-3-opus-20240229',
credentials=credentials
)
except CredentialsValidateFailedError as ex:
diff --git a/api/core/model_runtime/model_providers/anthropic/llm/claude-instant-1.2.yaml b/api/core/model_runtime/model_providers/anthropic/llm/claude-instant-1.2.yaml
index 929a7f8725e..ac69bbf4d29 100644
--- a/api/core/model_runtime/model_providers/anthropic/llm/claude-instant-1.2.yaml
+++ b/api/core/model_runtime/model_providers/anthropic/llm/claude-instant-1.2.yaml
@@ -33,3 +33,4 @@ pricing:
output: '5.51'
unit: '0.000001'
currency: USD
+deprecated: true