Skip to content

Commit

Permalink
🐛 fix: Prevent Default Values in OpenAI/Custom Endpoint Agents (danny…
Browse files Browse the repository at this point in the history
…-avila#5180)

* fix: prevent OpenAI/custom-endpoint agents from using default values

* fix: order of assigning client options

* chore: typing for runnable config
  • Loading branch information
danny-avila authored Jan 4, 2025
1 parent c26b54c commit 7c61115
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"@langchain/google-genai": "^0.1.6",
"@langchain/google-vertexai": "^0.1.6",
"@langchain/textsplitters": "^0.1.0",
"@librechat/agents": "^1.9.92",
"@librechat/agents": "^1.9.94",
"axios": "^1.7.7",
"bcryptjs": "^2.4.3",
"cheerio": "^1.0.0-rc.12",
Expand Down
2 changes: 2 additions & 0 deletions api/server/controllers/agents/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const { createRun } = require('./run');
const { logger } = require('~/config');

/** @typedef {import('@librechat/agents').MessageContentComplex} MessageContentComplex */
/** @typedef {import('@langchain/core/runnables').RunnableConfig} RunnableConfig */

const providerParsers = {
[EModelEndpoint.openAI]: openAISchema,
Expand Down Expand Up @@ -488,6 +489,7 @@ class AgentClient extends BaseClient {
// });
// }

/** @type {Partial<RunnableConfig> & { version: 'v1' | 'v2'; run_id?: string; streamMode: string }} */
const config = {
configurable: {
thread_id: this.conversationId,
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7c61115

Please sign in to comment.