Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

fix(Anthropic): only pass properties defined by API reference in payload (#938)

Danny Avila81bda112d337
diff --git a/api/app/clients/AnthropicClient.js b/api/app/clients/AnthropicClient.js
index 304208e49d..5c35bc28f4 100644
--- a/api/app/clients/AnthropicClient.js
+++ b/api/app/clients/AnthropicClient.js
@@ -268,14 +268,25 @@ class AnthropicClient extends BaseClient {
};
let text = '';
- const { model, stream, maxOutputTokens, ...rest } = this.modelOptions;
+ const {
+ stream,
+ model,
+ temperature,
+ maxOutputTokens,
+ stop: stop_sequences,
+ topP: top_p,
+ topK: top_k,
+ } = this.modelOptions;
const requestOptions = {
prompt: payload,
model,
stream: stream || true,
max_tokens_to_sample: maxOutputTokens || 1500,
+ stop_sequences,
+ temperature,
metadata,
- ...rest,
+ top_p,
+ top_k,
};
if (this.options.debug) {
console.log('AnthropicClient: requestOptions');