Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Support o1 tool-calling #5318

Open
1 task done
weipienlee opened this issue Jan 15, 2025 · 3 comments
Open
1 task done

Enhancement: Support o1 tool-calling #5318

weipienlee opened this issue Jan 15, 2025 · 3 comments
Labels
enhancement New feature or request

Comments

@weipienlee
Copy link

weipienlee commented Jan 15, 2025

See update message below.

What happened?

The o1 releases (non-preview) now support function calling but does not work with the LibreChat "plugin" mode.

  • o1 chat model works in (non-plugin) chat mode.
  • o1 plugin mode works with "openai service" (not Azure) with same steps described below, EXCEPT if an o1 model is selected for the agent e.g. o1-mini

Steps to Reproduce

  1. select plugin from dropdown
  2. choose "o1-2024-12-17" model (for some reason it doesn't list "o1" model, it does list "o1-mini" without date)
  3. set temperature to 1.0
  4. choose agent llm gpt-4o-mini
  5. choose tavily search plugin (or google)
  6. ask avatar "whats the weather in london now"

What browsers are you seeing the problem on?

No response

Relevant log output

LibreChat         | 2025-01-15 22:12:17 error: [RunManager] handleLLMError: {"context":"plugins","conversationId":"45e5cbce-14ac-4a84-98c2-ac0b583cebf4","initialMessageCount":8} 400 Unsupported value: 'messages[0].role' does not support 'system' with this model.
LibreChat         | Error in handler Handler, handleLLMError: Error: Error: 400 Unsupported value: 'messages[0].role' does not support 'system' with this model.
LibreChat         | [chain/error] [1:chain:AgentExecutor] [1.86s] Chain run errored with error: "400 Unsupported value: 'messages[0].role' does not support 'system' with this model.\n\nError: 400 Unsupported value: 'messages[0].role' does not support 'system' with this model.\n    at APIError.generate (/app/node_modules/@langchain/openai/node_modules/openai/error.js:45:20)\n    at OpenAI.makeStatusError (/app/node_modules/@langchain/openai/node_modules/openai/core.js:293:33)\n    at OpenAI.makeRequest (/app/node_modules/@langchain/openai/node_modules/openai/core.js:337:30)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async /app/node_modules/@langchain/openai/dist/chat_models.cjs:1548:29\n    at async RetryOperation._fn (/app/node_modules/p-retry/index.js:50:12)"
LibreChat         | 2025-01-15 22:12:17 error: [PluginsClient] executorCall error: 400 Unsupported value: 'messages[0].role' does not support 'system' with this model.

Screenshots

image

Code of Conduct

  • I agree to follow this project's Code of Conduct
@weipienlee weipienlee added the bug Something isn't working label Jan 15, 2025
@weipienlee weipienlee changed the title [Bug]: plugin not working with Azure o1 model [Bug]: plugin not working with (Azure) o1 model Jan 15, 2025
@weipienlee
Copy link
Author

weipienlee commented Jan 15, 2025

UPDATE, I just read in documentation that plugins is deprecated. Unfortunately, o1 models yield errors with agents despite it support function calling (unless openai really distinguish between function- and tool-calling).

LibreChat         | 2025-01-15 22:44:35 error: [api/server/controllers/agents/client.js #sendCompletion] Unhandled error type 404 tools is not supported in this model. For a list of supported models, refer to https://platform.openai.com/docs/guides/function-calling#models-supporting-function-calling.
LibreChat         | 
LibreChat         | Troubleshooting URL: https://js.langchain.com/docs/troubleshooting/errors/MODEL_NOT_FOUND/
LibreChat         | 
LibreChat         | 2025-01-15 22:44:35 error: [handleAbortError] AI response error; aborting request: 404 tools is not supported in this model. For a list of supported models, refer to https://platform.openai.com/docs/guides/function-calling#models-supporting-function-calling.
LibreChat         | 
LibreChat         | Troubleshooting URL: https://js.langchain.com/docs/troubleshooting/errors/MODEL_NOT_FOUND/

while Azure o1 models (@temp 1.0) yield:

LibreChat         | 2025-01-15 22:50:11 error: [api/server/controllers/agents/client.js #sendCompletion] Unhandled error type 400 Unsupported value: 'stream' does not support true with this model. Supported values are: false.
LibreChat         | 2025-01-15 22:50:11 error: [handleAbortError] AI response error; aborting request: 400 Unsupported value: 'stream' does not support true with this model. Supported values are: false.

seems same as previously resolved issue with normal Azure o1 completion end point.

@weipienlee weipienlee changed the title [Bug]: plugin not working with (Azure) o1 model [Bug]: plugin/agent not working with (Azure) o1 model Jan 15, 2025
@danny-avila danny-avila added enhancement New feature or request and removed bug Something isn't working labels Jan 16, 2025
@danny-avila danny-avila changed the title [Bug]: plugin/agent not working with (Azure) o1 model Enhancement: Support o1 tool-calling Jan 16, 2025
@danny-avila
Copy link
Owner

o1 tool calling is still new and has to be implemented still, it's handled differently and the fact that streaming isn't supported deviates from the current system.

@weipienlee
Copy link
Author

Ah tnx @danny-avila, i hoped it was just the same problem as the completion end-point, just removing the parameter and such. Looking forward for the support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants