Agent multi step function_calling Error, use gpt-4o model #15231

Closed
opened 2026-02-21 19:20:47 -05:00 by yindo · 1 comment
Owner

Originally created by @zh-en520 on GitHub (Jul 9, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.1.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Image [openai_api_compatible] Error: PluginInvokeError: {"args":{"description":"[models] Error: API request failed with status code 400: {\"error\":{\"message\":\"litellm.BadRequestError: AzureException - 'function' is not an allowed role. The allowed roles are ['developer', 'system', 'user', 'assistant', 'tool'].. Received Model Group=gpt-4o\\nAvailable Model Group Fallbacks=None\",\"type\":null,\"param\":null,\"code\":\"400\"}}"},"error_type":"InvokeError","message":"[models] Error: API request failed with status code 400: {\"error\":{\"message\":\"litellm.BadRequestError: AzureException - 'function' is not an allowed role. The allowed roles are ['developer', 'system', 'user', 'assistant', 'tool'].. Received Model Group=gpt-4o\\nAvailable Model Group Fallbacks=None\",\"type\":null,\"param\":nu

✔️ Expected Behavior

I hope to solve the problem of multi-step function calling for AI agents. For example, a process where first the text in an image is recognized, and then knowledge base retrieval is performed based on that text from the image.

Actual Behavior

No response

Originally created by @zh-en520 on GitHub (Jul 9, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.1.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce <img width="2549" height="1060" alt="Image" src="https://github.com/user-attachments/assets/3c881a20-3a68-4ef7-bd72-f3caef3ecccb" /> [openai_api_compatible] Error: PluginInvokeError: {"args":{"description":"[models] Error: API request failed with status code 400: {\"error\":{\"message\":\"litellm.BadRequestError: AzureException - 'function' is not an allowed role. The allowed roles are ['developer', 'system', 'user', 'assistant', 'tool'].. Received Model Group=gpt-4o\\nAvailable Model Group Fallbacks=None\",\"type\":null,\"param\":null,\"code\":\"400\"}}"},"error_type":"InvokeError","message":"[models] Error: API request failed with status code 400: {\"error\":{\"message\":\"litellm.BadRequestError: AzureException - 'function' is not an allowed role. The allowed roles are ['developer', 'system', 'user', 'assistant', 'tool'].. Received Model Group=gpt-4o\\nAvailable Model Group Fallbacks=None\",\"type\":null,\"param\":nu ### ✔️ Expected Behavior I hope to solve the problem of multi-step function calling for AI agents. For example, a process where first the text in an image is recognized, and then knowledge base retrieval is performed based on that text from the image. ### ❌ Actual Behavior _No response_
yindo added the 🤖 feat:agent🔨 feat:tools labels 2026-02-21 19:20:47 -05:00
yindo closed this issue 2026-02-21 19:20:47 -05:00
Author
Owner

@crazywoola commented on GitHub (Jul 9, 2025):

Please upgrade dify and plugin to latest version.

@crazywoola commented on GitHub (Jul 9, 2025): Please upgrade dify and plugin to latest version.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#15231