mirror of
https://github.com/langgenius/dify.git
synced 2026-07-22 04:25:29 -04:00
Agent cannot correctly parse "tool_calls" in multiple rounds of conversation #4869
Closed
opened 2026-02-21 18:08:22 -05:00 by yindo
·
7 comments
No Branch/Tag Specified
main
build/cus-1418-annotation-probe
deploy/agent
feat/hitl-im-dev
fix/dify-2825-agent-chat-scope
chore/support-preview-mode-fe
deploy/dev
0722-happy-path-complete
deploy/saas
0721-happy-path-smoke
0721-document-detail
0720-documents-tasks
0720-crawl-selection
0720-crawl-preview
0720-source-connections
0720-create-knowledge
0720-new-rag-contracts
0720-new-rag-list
lts/1.13.x
perf/optimize-markdown-renderer
deploy/enterprise
gareth/esq1-170-rbac-for-agent
yanli/refactor-sandbox-and-e2b
copilot/fix-security-issue
feat/ce-telemetry-dev
release/e-1.11.4
hotfix/cus-1422-enterprise-api-timeout
feat/fix-undefined-answer-preview
hotfix/1.15.0-fix.15
laipz8200/human-input-loop-iteration
codex/migrate-knowledge-fs
hotfix/1.15.0-fix.14
deploy/workflow-archive-catalog-discovery
dependabot/uv/api/pydantic-09001a97e5
laipz8200/completion-workflow-entry
dependabot/uv/api/lts/1.13.x/python-packages-6c2bf7110c
dependabot/uv/api/storage-4219cfbece
dependabot/uv/api/lts/1.13.x/dev-6fc4f8b90c
dependabot/uv/api/llm-46e0cee538
dependabot/uv/api/lts/1.13.x/vdb-72526f7860
dependabot/uv/api/opentelemetry-b8005594e1
dependabot/uv/api/lts/1.13.x/storage-4310e8b8d8
dependabot/uv/api/lts/1.13.x/database-c0fba9b420
dependabot/uv/api/lts/1.13.x/llm-5ce1d68736
dependabot/uv/api/lts/1.13.x/pydantic-09001a97e5
dependabot/uv/api/lts/1.13.x/opentelemetry-b8005594e1
dependabot/uv/api/google-68de7a6be5
dependabot/github_actions/lts/1.13.x/github-actions-dependencies-1a36b91cf1
dependabot/uv/api/lts/1.13.x/google-c93828e58f
dependabot/uv/api/lts/1.13.x/flask-1086fc46af
0717-knowledge-fs-contract
feat/secret-scrub-persistence
feat/llm-ft-timeout
feat/appdeploy-selected-workflow-dsl
0715-new-rag
laipz8200/llm-environment-variables
release/ee-1.15.0-hotfix
laipz8200/chore-remove-feature-preview-root-env
dependabot/go_modules/dify-agent-runtime/golang.org/x/net-0.55.0
hotfix/1.15.0-fix.12
hotfix/1.15.0-fix.12-cherrypick
hotfix/1.15.0-fix.13
build/invite-seats-precheck
hotfix/1.15.0-fix.11
laipz8200/workflow-persistence-mixed-mode
hotfix/1.15.0-fix.10
zhangxin/eng-558-licensed-seats-1.15
fix/wta-1307-effect-suspense-read
feat/cli-skills-agents
0713-vp-lint
fix/agent-roster-answer-completion-main
feat/pay-by-invoice
codex/run-external-e2e-main-ci
agent/remove-sandbox-bind-mounts
feat/agent-v2-e2e-test
hotfix/1.15.0-fix.9
hotfix/1.15.0-fix.8
build/test-archive-export
linw/restore-agent-message-delta-feat
hotfix/1.15.0-fix.7
hotfix/1.15.0-fix.6
codex/pr-38227-session-types
codex/pr-38227-session-scope-split
fix/ui-fix
hotfix/1.15.0-fix.4
codex/review-pr-38480
hotfix/1.15.0-fix.2
copilot/fix-web-full-stack-e2e-job
fix/dify-2738-agent-node-dsl-export
hotfix/1.15.0-fix.3
fix/scope-segment-batch-delete
laipz8200/scope-segment-route-lookup
chore/i18n-sync-7b7956f3e7ca-e901a65a
codex/upgrade-orpc-v2-beta
hotfix/1.15.0-fix.1
codex/upgrade-openapi-ts-autofix
codex/upgrade-next-16-3-preview
hotfix/1.15.0-fix.0
hotfix/web-detail-adjustment-before-release
release/e-1.15.0
codex/replace-lamejs-with-mediabunny
copilot/add-more-tests
deploy/archive-db-resilience
fix/studio-nav-home-button
hotfix/1.14.2-fix.13
worktree-token-expired-error-code
hotfix-1.14.2-fix.12
codex/agent-v2-state-graph
codex/refactor-deployment-detail-components
hotfix/1.14.2-fix.12
build/fix/workflow-error-hanging
work/dify-2585-agent-drafts-pr
fix/dify-2574-soul-files-kv
fix/dify-2554-debug-conversation-per-user
hotfix/1.14.2-fix.11
feat/openapi-rbac
test/cli-e2e-error-body-contract
build/optimize-clean-messages-eligible-apps
zhaohao1004/optimize-clean-messages-cursor
gh-readonly-queue/main/pr-37592-c71f03f5902031b7c02e61af3aff5c2dee6f7d85
build/optimize-clean-messages-cursor
feat/country
codex/vp-fmt-migration
hotfix/1.14.2-fix.10
hotfix/1.14.2-fix.9
hotfix/1.14.2-fix.8
hotfix/1.14.2-fix.7
hotfix/1.14.2-fix.6
codex/page-title-updates
feat/agent-mention-stable-ids
fix/guard-workspace-with-defualt-roles
build/pr-37227-free-plan-workflow-run-cleanup
feat/cli-e2e-test-suite
feat/ui-start-node
feat/hitl-file-in-body
copilot/dify-team-question-agent-node
fix/wta-438-device-sso-redirect-origin
hotfix/1.14.2-fix.5
feat/dev-snippet-fronted
feat/mcp-token-transfer
chore/keep-info-icon-the-same-postion
codex/local-app-list-tag-filter
feat/snippet-new
hotfix/1.14.2-fix.4
codex/migrate-var-reference-combobox
hotfix/1.14.2-fix.3
feat/marketplace-template
chore/deploy-saas-workflow
hotfix/1.14.2-fix.2
build/cli
codex/snp-406-pointer-position-ref
hotfix/1.14.1-fix.3
build/feat/model-type-migration-script
fix/webapp-disabled-not-jump-to-webapp-login
fix/lb-model-type-dedup
song/eng-379-file-output-check-executor
chore/bump-authlib-1.6.12
fix/tag-trigger-preserve-case
chore/bump-sendgrid-lts-1.13.x
fix/model-type-enum-construction
refactor/add-missing-override-decorator
work/web-mcp-1.14.1
copilot/check-runtime-limits
laipz8200/workflow-response-stream-filter
copilot/query-issues-pr-images
laipz8200/fix-autofix-contract-generation
copilot/fix-autofix-job-failure
codex/deprecate-sys-files-compat
codex/fix-scrolling-issue-with-overflow-visible
copilot/research-retrieval-attachment-consumption
copilot/research-agent-node-implementation
chore/upgrade-xyflow-v12
hotfix/1.14.1-fix.1
build/1.14.1-fix.1-langfuse
hotfix/1.14.1-fix.2
feat/lts-lazy-dialogue-count
fix/can-not-create-knowledge
codex/fix-marketplace-hero-shake
codex/tag-name-url-filter
upgrade-graphon-to-0-3-0
codex/app-delete-enter-confirm
build/sample-tidb
codex/revert-pr-35708
chore/remove-dify-deploy-script
chore/simpler-deploy
lts/1.13.x-fix-35910
feat/storage-path-prefix
hotfix/1.13.3-fix10
hotfix/1.13.3-fix9
hotfix/1.14.0-fix.4
hotfix/1.14.0-fix.3
hotfix/1.14.0-fix.2
revert-35748-4-30-open-api
feat/upgrade-graphon
copilot/research-celery-task-ttl
hotfix/1.14.0-fix.1
copilot/fix-css-issue
feat/s3-public-base-url
hotfix/1.13.3-fix8
build/depot-speed-benchmark-20260426
build/depot-speed-benchmark-20260426-warm
hotfix/1.13.3-fix7
feat/evaluation
fix/workflow-line
chore/dependency-upgrade
deploy/zhaohao
feat/replayable-stream
feat/show-the-hierarchy-in-phonenix-trace
p363-reviewed
build/billing-v3
copilot/list-contributions-to-dify
cursor/migrate-tooltip-to-popover-infotips
refactor/quota-service
feat/new-biliing-quota
hotfix/1.13.3-fix6
cursor/dify-ui-infra
p363-hjlarry
cursor/refactor-select-trigger-api
chore/lts-13x-bump-deps
codex/tighten-button-tone-types
locate-queue-autocreate-deps
hotfix/1.13.3-fix5
feat/new-agent-node
hotfix/1.13.3-fix4
feat/per-db-credential
chore/i18n-sync-208604a3a819-9220dd74
chore/i18n-sync-1b369cede4b4-0e13ce3f
chore/i18n-sync-c93e40212e4c-0e13ce3f
codex/fix-vite-audit-in-sdk-test
copilot/fix-agent-dialogue-input-limit
codex/dify-ui-package-migration
4-2-no-global-loading
fix/ps-not-send
3-18-no-global-loading
feat/support-agent-sandbox
hotfix/1.13.3-fix3
hotfix/1.13.3-fix2
4-1-unocss
build/feat/saas-quota-v4
feat/remove-unused-is-deleted-from-conversation
codex-add-podman-compose-dev-scripts
fix-partnerstack-cookie-sync
hotfix/1.13.3-fix1
3-31-vite-task-cache
test/add-test-case-for-prompt-editor
build/feat/saas-quota
build/feat/saas-quota-v2
deploy/agent-dev
yanli/fix-iter-log
review-myscale-sqli
codex/force-node24-for-actions
ci/docker-build-narrowing
chore/dependabot-alert-to-bot
verify-email-reset-flow
3-26-cache-lint-for-autofix
gh-readonly-queue/main/pr-34120-2cbcf9518e40104286a3034f3c3c688cd4ff9fbf
gh-readonly-queue/main/pr-34123-1c72b8d9db03b93b3fc7f86bc522e53806f5a8f0
gh-readonly-queue/main/pr-33960-38285aa1ac6de98614456f49b4d834fe503f4e58
p383
yanli/phase3-code-scope
test/workflow-app
codex/migrate-old-toast-calls-and-update-translations
hotfix/1.13.2-fix2
focal-quokka
codex/fix-issue-33422-in-repository
hotfix/1.13.2-fix1
copilot/refactor-test-config-leak-fix
build/release-1.13.2
fix-kpa-issue
build/release-1.13.1-rc.3
3-18-dev-with-http2
build/release-1.13.1-rc.2
3-16-revert-changes
3-16-add-csp
build/release-1.13.1-rc.1
feat/source-for-plugin-tasks
3-16-next-lib
revert-33484-dependabot/pip/api/python-packages-2eba66ec58
move-trigger-nodes
copilot/refactor-test-config-leak-detection
fix/enterprise-api-error-handling
release/e-1.12.1
fix/vinext-deps
yanli/docx-image-render
copilot/analyze-dify-code
deploy/clean-task-trace
copilot/sub-pr-33044
3-6-type-check
feat/model-provider-refactor
copilot/refactor-unnecessary-cast-call
build/export-app-messages
1.12.1-otel-ee
hotfix/1.13.0-fix.4
update-checker
test/ui-primitive-wrapper-tests-pr
hotfix/1.13.0-fix.3
refactor/base-comp
deploy/memory-usage
hotfix/1.13.0-fix.2
hotfix/1.13.0-fix.1
build/sandbox-clean-job-260302-1
build/sandbox-clean-job
fix/otel-upgrade-e-1.12.1
build/optimize-workflow-run-cleanup
move-core-prompt-runtime
hotfix/1.12.1-fix.6
copilot/remove-pm2-from-docker
move-token-buffer-memory
32589-main-repo
fix/access-mode-sso-verified
refactor/remove-workspace-mutate-from-context
2-11-fix-lint
feat/plugins-marketplace-ssr-prefetch-loading
build/message-clean-performance-log
refactor/template-transform-node
hotfix/1.12.1-fix.5
2-9-stable-test-2
pre-align-hitl-frontend
fix/preserve-UNC-paths-in-conversation-opner
hotfix/1.12.1-fix.4
hotfix/1.12.1-fix.3
feat/add-update-all-plugin-button
refactor/share
hotfix/1.12.1-fix.2
test/inprove-quality
feat/add_templates
hotfix/1.12.1-fix.1
fix/ee-1511-set-default-provider-user-id-bug
copilot/fix-pnpm-test
hotfix/1.12.1-fix.0
feat/vibe-wf
fix/fix-test
fix/console_ns_import
release/1.12.1
fix/workflow-sync-draft
refactor/ssr-prefetch-zustand-removal
1-24-kubb-generate
refactor/migrate-react-window-to-tanstack-virtual
fix/input-ime-onpressenter
1-30-fix-failed-test
feat/structured-output-with-sandbox
yanli/init-ty
hotfix/1.11.4-fix.4
fix/trigger-plugin-output
fix/parallel-generation-render
refactor/configuration
yanli/add-opaque-body
build/billing-refactor-test-2026012701
refactor/debug-and-preview-store
refactor/tools-workflow
build/debug-billing-refactor
build/billing-service
build-billing-service
feat/add-agentation
refactor/app-components
build/collaboration
copilot/sub-pr-31424
refactor/local-storage
refactor/skill-bundler
hotfix/1.11.4-fix.3
build/archive-workflow-run
feat/pull-a-variable
hotfix/1.11.4-fix.2
copilot/sub-pr-30849
hotfix/1.11.4-fix.1
1-21-test-window-is-not-defined
revert-30727-feat/model-total-credits
copilot/sub-pr-31283
zhsama/multi-turn-popup
zhsama/panel-var-popup
12-19-demo-for-app-store
refactor/migrate-app-detail-to-tanstack-query
build/clear-message
feat/credential-sync-fix-ee
feat/llm-first-token-timeout
zhsama/assemble-var-input
release/e-1.11.2
feature/task-quadrant-view
zhsama/llm-warning-ui
build/clear-workflow-run
zhsama/agent-at-nodes
build/1.11.4
release/e-1.6.0-fix.1
release/e-0.15.8-fix.1
1-14-remove-web-app-access-token
refactor/plugins-detail
fix/reset-dev
feat/llm-support-tools
feat/knowledge-summary-index
fix/preact-security-vulnerability
copilot/fix-clear-query-params-test
refactor/query-params-nuqs
chore/upgrade-pnpm-10.28.0
8c92-update-api-core
detached
chore/i18n-sync-20260107-104636
chore/i18n-sync-20260107-102654
feat/grouping-branching
feat/agent-node-v2
hotfix/1.11.2-fix.3
feat/llm-node-support-tools
refactor/remove-axios-dependency
refactor/web-service-hooks
fix/pwa-plugin-migration
chore/refactor-text-generation
hotfix/1.11.2-fix.2
release/e-1.11.1
release/e-1.9.2
release/e-1.8.2
hotfix/1.11.2-hotfix-1
refactor/chat-messages-service-api
fix/knowledge-retrieval-node-affected-by-past-version
fix/esbuild-dependabot-145
chore/automated-i18n-updates-02e0fadef78f0c888b79e7a52ae6714ac73effdc
chore/automated-i18n-updates-eb73f9a9b9fc9eee6be786d2bf5f41fc77e240c4
hotfix/1.11.1-2
refactor-text-generate-item
feat/end-user-oauth
feat/add-qdrant-to-tidb-migration
codex/run-pnpm-lint-fix-and-commit-changes
feat/document-test
feat/e2e-testing
deploy/trigger-dev
hotfix/1.11.1-1
e-260
refactor/use-log-react-query
feat/fallback-interface-for-unauthorized-datasource-node
hotfix/1.10.1-fix.4
refactor/app/components/app/text-generate/item/index.tsx-and-add-test
release/e-1.6.0
hotfix/1.10.1-fix.3
hotfix/1.10.1-fix.2
feat/tracking-1203
deploy/end-user-oauth
hotfix/1.10.1-fix.1
refactor/marketplace-react-query
feat/detect-cognitive-complexity
fix/codeowners
fix/httpx_timeout_parameters
feat/end-user-auth-dummy-apis
chore/re-point-doc-urls
fix/share-markdown-xss
feat/data-tracking
feat/memory-orchestration-be
build/trigger-billing
chore/remove-docker-legacy-dir
copilot/reverse-engineer-dify-application
feat/amplitude
feat/trigger-saas
mysql-adapt
test/build-diff-edition
feat/no-root-image
feat/trigger
feat/ga-tracking
feat/collaboration
mysql-adaptation
feat/sqlalchemy-type-annotations
build/trigger-1
build/self-tenant-queue
mcp-conditional-capability
fix/mcp-capability
hotfix/1.9.2-fix.3
hotfix/1.9.2-fix.2
feat/iteration-node
hotfix/1.9.2-fix.1
hotfix/1.9.1-fix.1
e1ca7a9bdb0443b9f027b6de16
fix/login-status
feat/gtag-1016
test/monaco-editor-and-remix-icon-upgrade
copilot/fix-ce7a9189-f70c-4ea9-81ba-3f49303104d6
feat/memory-orchestration-be-dev-env
build/trigger
feat/add-knowledge-pipeline-template-command
chore/workflow-performance
copilot/fix-fc039c44-aa24-4844-82b2-e9ac237a13e9
test/log-refactor
chore/ssrf-config
feat/pinecone-vdb
copilot/fix-d8c5989d-5a30-418f-8dc4-099cf1f37218
deploy/rag-dev
hotfix/1.9.0-fix.2
pinecone
fix/document-query
feat/trigger_backup
feat/playwright-integration
feat/trigger_merging
feat/chunk-deduplication
feat/crendential-policy-default-check
feat/credential-policy
release/e-1.8.1
fix/template-list
feat/end_user
feat/trigger-fe
revert-25628-refactor-24421-app-datasets-part1
fix/plugin-tag-fallback
fix/unselect-credential
feat/limit-conv-var-desc-length
feat/rag-pipeline-service-api
fix/empty-plugin-list
feat/plugin-readme
feat/plugin-readme-fe
feat/container-node-extract-mapping
bug1
fix/model-credential
feat/big-var-value-show-fe
build/1.7.2-fix.2
release/e-1.7.2
build/boolean-type
feat/oauth-provider-fe
build/0.7.2-fix.1
feat/model-credentials
feat/model-auth
feat/rag-2-preview
release/e-1.7.1
fix/hotfix-tool-provider-deadlock
feat/knowledge-pipeline-access-control
config-tool-file-size
13604-when-using-redis-cluster-for-caching-add-global_prefix-to-all-keys-cached-by-redis
feat/model-credentils
build/oauth
feat/oauth
feat/human-input
build/plugin-auto-upgrade
test/performance
feat/tool-plugin-oauth
feat/tool-oauth
temp-feat-owner-transfer-enterprise-frontend
release/e-3.0.2
feat/plugin-auto-upgrade-fe
chore/offline-the-sys-files
feat/rag-pipeline
feat/r2
release/e-3.2.0
wtw/rag-pipeline
feat/add-retrival-field-in-dataset
feat/webapp-verified-sso-main
fix/app-not-published-error
feat/webapp-verified-sso-260
v141-hotfix
fix/20326-tool-invoke-error-instance-account
fix/19933-account-object-has-no-attribute-_current_tenant-when-workflow-uses-workflow-as-tool-node
hotfix/0519
fix/e-legacy-clean-up
fix/admin-permission
fix/e-admin-permission
feat/model-memory
feat/webapp-auth-api
1.0.0-fix
revert-17133-fix/i16990-text-to-language-settings
e-0156
hotfix/translation-fix
fix/slider-style-error
e-0154
release/0.15.6-alpha-1
cohere/cleanup-free-tenants-logs
chore/auto-dify
fix/rag-infinity-spaces-loop
fix/dataset-admin
fix/expose-debugging-port
fix/tool-info
fix/aws-s3-r2-compatible
feat/knowledge-metabase
fix/fail-branch-stream-output-error
release/0.15.3-fix1
feat/14009-feature-request-support-for-retrieving-historical-conversations-without-from-enduser-id
feat/upgrade-unstructured-version-10.2
feat/classnames-sort
feat/upgrade-unstructured-version
fix/version-check
fix/handle-agent-none-value
fix/agent-params-pasring
fix/agent-parallel
feat/knowledge-dark-mode
feat/custom-tool-input
release/0.15.2-fix1
0.15.1-admin-apis
feat/support-docx-image-view
feat/agent-stream-output
feat/workflow-node-dark-mode
fix/switch-strategy-clean-param
fix/chore-fix
opik-monitoring
provider-gpustack
feat/mecab-japanese-keywords
feat/retry-single-step-debug
revert-12086-feat/parent-child-retrieval
fix/remove-the-retry-index-field
fix/11839
feat/node-execution-retry
feat/support-extractor-tools-update-wip
feat/update-tidb-batchget-endpoint
fix/iteration-thread-pool-error
feat/support-multi-token-count
feat/parent-child-retrieval-api
fix/app-icon-is-missing
feat/support-extractor-tools-update
test/disable_site
build/add-dependabot
feat/support-extractor-tools
fix/docx-extract-image-ssrf
fix/redis-slow-in-gevent
fix/9772-internal-server-error-when-custom-disclaimer-longer-than-64-characters
alert-autofix-89
build/eslint-react-refresh-plugin
build/switch-to-pnpm
revert-9424-feat/update-dataset-clean-rule
fix/external-knowledge-retrieval-issues
feat/login-type-coontrol
feat/external-knowledge-api
feat/rag-external-knowledge-with-api
feat/external-knowledge
fix/notion-table-extract
fix/tooltip
feat/workflow-add-block-shortcut
feat/update-docs
fix/note-node-zoom-issue
fix/model-runtime-quato-issue
fix/db-lock-timeout
feat/new-tooltip
feat/web-app-sso
chore/optimize-app-workflow-deletion-slow-sql
fix/trace_app_config_app_id_idx
fix/extra-table-tracing-app-config
feat/update-beat-job-time-to-env
fix/index-estimate-error
chore/enterprise-license-status
fix/remove-tsne_position
feat/2p
feat/aws-iam-auth-check
feat/add-flashrank
feat/support-milvus-2.4
feat/add-resource-from-tools
bai
1.16.0
1.16.0-rc1
1.15.0
1.14.2
1.14.1
1.14.0
1.13.3
1.13.2
1.13.1
1.14.0-rc1
1.13.0
1.12.1
1.12.0
1.11.4
1.11.3
1.11.2
1.11.1
1.11.0
1.10.1-fix.1
1.10.1
1.10.0
1.10.0-rc1
1.9.2
1.9.1
1.9.0
2.0.0-beta.2
2.0.0-beta.1
1.8.1
1.8.0
1.7.2
1.7.1
1.7.0
1.6.0
1.5.1
1.5.0
1.4.3
1.4.2
0.15.8
1.4.1
1.4.0
1.3.1
0.15.7
1.3.0
0.15.6
1.2.0
0.15.6-alpha.1
1.1.3
0.15.5
1.1.2
0.15.4
1.1.1
1.1.0
1.0.1
1.0.0
0.15.3
0.15.2
0.15.1
1.0.0-beta.1
0.15.0
0.14.2
v0.8.3-fix1
0.14.1
0.14.0
0.13.2
0.13.1
0.13.0
0.12.1
0.12.0
0.11.2
0.11.1
0.10.2-fix1
0.11.0
0.10.2
0.10.1
0.10.0
0.10.0-beta3
0.9.2
0.9.1-fix1
0.10.0-beta2
0.10.0-beta1
0.9.1
0.9.0
0.8.3
0.8.2
0.8.1
0.8.0
0.8.0-beta1
0.7.3
0.7.2
0.7.1
0.7.0
0.6.16
0.6.15
0.6.14
0.6.13
0.6.12-fix1
0.6.12
0.6.11
0.6.10
0.6.9
0.6.8
0.6.7
0.6.6
0.6.5
0.6.4
0.6.3
0.6.2
0.6.1
0.6.0-fix1
0.6.0
0.6.0-preview-workflow.2
0.5.11-fix1
0.5.11
0.6.0-preview-workflow.1
0.5.10
0.5.9
0.5.8
0.5.7
0.5.6
0.5.5
0.5.4
0.5.3
0.5.2
0.5.1
0.5.0
0.4.9
0.4.8
0.4.7
0.4.6
0.4.5
0.4.4
0.4.3
0.4.2
0.4.1
0.4.0
0.3.34
0.3.33
0.3.32
0.3.31-fix3
0.3.31-fix2
0.3.31-fix1
0.3.31
0.3.30
0.3.29
0.3.28
0.3.27
0.3.26
0.3.25
0.3.24
0.3.23
0.3.22
0.3.21
0.3.20
0.3.19
0.3.18
0.3.17
0.3.16
0.3.15
0.3.14
0.3.13
0.3.12
0.3.11
0.3.10
0.3.9
0.3.8
0.3.7
0.3.6
0.3.5
0.3.4
0.3.3
0.3.2
0.3.1
0.3.0
0.2.2
0.2.1
Labels
Clear labels
Knowledge Pipeline
Proposal
WIP
cloud
dependencies
feat:webapp
good first issue
outdated
performance
pull-request
python:uv
refactor
size:L
stale
status: accepting prs
status: blocked
status: in discussion
stt & tts
vulnerablity
web
wont-fix
🌊 feat:workflow
🌚 invalid
🐞 bug
👻 feat:rag
💪 enhancement
📚 documentation
🔨 feat:tools
🙋♂️ question
🙏 help wanted
🤔 cant-reproduce
🤖 feat:agent
Mirrored from GitHub Pull Request
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: langgenius/dify#4869
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lidajiededa on GitHub (Aug 2, 2024).
Self Checks
Dify version
0.6.15
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Model
qwen-2-72B
Problems
During the process of using agents for function calls and multiple rounds of conversations, we found that the latter few rounds of conversations would produce abnormal responses. By examining the database, we found that there is an issue with ("tool_calls" ->"function" ->"arguments") when retrieving history in multiple rounds of conversations. We let the arguments be a json list with 2 attributes -- 'action' and 'demand'. The 'tool_calls' result is rightly shown, but in the second and three rounds of conversation, agent should first get the histroy results. We found that there are '\\'s in 'arguments':
"arguments": "{\"preferences\": \"[{'action': '\\u963b\\u6b62', 'demand': '\\u65b0\\u4eac\\u62a5'}]\"}"}}The correct one should be
`"arguments": "{"preferences": "[{'action': '\u963b\u6b62', 'demand': '\u65b0\u4eac\u62a5'}]"}"}}
This situation will lead to abnormal performance of the agent in the later rounds.
This issue may be caused by encoding problems during the reading and writing of history in multiple rounds of dialogue.
The following are the database records and the results after decoding. We can see that there are '\\'s in the 'arguments', ade there is a problem with the output of the last two rounds, as it outputs' 英阳联盟' instead of '英雄联盟'
`### Database records
round1
[{"role": "user", "text": "\u4e0d\u60f3\u770b\u65b0\u4eac\u62a5", "files": []}, {"role": "assistant", "text": "", "files": [], "tool_calls": [{"id": "call_8a7e093f-8938-4d7c-81ac-65e43aa8fa3b", "type": "function", "function": {"name": "ai_agent_profile", "arguments": "{\"preferences\": \"[{'action': '\u963b\u6b62', 'demand': '\u65b0\u4eac\u62a5'}]\"}"}}]}, {"role": "tool", "text": "{\"profile\": [{\"granularity\": \"TNAME\", \"type\": \"ALL\", \"content\": \"T1486538331796\", \"priority\": -1.0}], \"message\": \"\u5df2\u7ecf\u6839\u636e\u60a8\u7684\u5429\u5490\u8c03\u6574\u4e86\u63a8\u8350\u6a21\u5f0f\uff0c\u73b0\u5728\u60a8\u53ef\u4ee5\u53bb\u4e00\u63a2\u7a76\u7adf\u5566\uff01\"}", "files": [], "tool_calls": [{"id": "call_8a7e093f-8938-4d7c-81ac-65e43aa8fa3b", "type": "function", "function": {"name": "ai_agent_profile", "arguments": "{\"preferences\": \"[{'action': '\u963b\u6b62', 'demand': '\u65b0\u4eac\u62a5'}]\"}"}}]}]round2
[{"role": "user", "text": "\u4e0d\u60f3\u770b\u65b0\u4eac\u62a5", "files": []}, {"role": "assistant", "text": "\u7528\u6237\u8868\u8fbe\u4e86\u4e0d\u60f3\u770b\u6765\u81ea\u201c\u65b0\u4eac\u62a5\u201d\u7684\u5185\u5bb9\uff0c\u8fd9\u6d89\u53ca\u5230\u8c03\u6574\u63a8\u8350\u5185\u5bb9\uff0c\u963b\u6b62\u7279\u5b9a\u6765\u6e90\u7684\u4fe1\u606f\u3002", "files": [], "tool_calls": [{"id": "a7455157-a8ea-4a7c-8d21-529de2fdab0b", "type": "function", "function": {"name": "ai_agent_profile", "arguments": "{\"preferences\": \"[{'action': '\\u963b\\u6b62', 'demand': '\\u65b0\\u4eac\\u62a5'}]\"}"}}]}, {"role": "tool", "text": "{\"profile\": [{\"granularity\": \"TNAME\", \"type\": \"ALL\", \"content\": \"T1486538331796\", \"priority\": -1.0}], \"message\": \"\u5df2\u7ecf\u6839\u636e\u60a8\u7684\u5429\u5490\u8c03\u6574\u4e86\u63a8\u8350\u6a21\u5f0f\uff0c\u73b0\u5728\u60a8\u53ef\u4ee5\u53bb\u4e00\u63a2\u7a76\u7adf\u5566\uff01\"}", "files": [], "tool_calls": [{"id": "a7455157-a8ea-4a7c-8d21-529de2fdab0b", "type": "function", "function": {"name": "ai_agent_profile", "arguments": "{\"preferences\": \"[{'action': '\\u963b\\u6b62', 'demand': '\\u65b0\\u4eac\\u62a5'}]\"}"}}]}, {"role": "assistant", "text": "\u6211\u5df2\u7ecf\u5e2e\u60a8\u8bbe\u7f6e\u597d\u4e86\uff0c\u60a8\u5c06\u4e0d\u518d\u770b\u5230\u65b0\u4eac\u62a5\u7684\u76f8\u5173\u4fe1\u606f\u3002", "files": []}, {"role": "user", "text": "\u60f3\u770b\u82f1\u96c4\u8054\u76df", "files": []}, {"role": "assistant", "text": "", "files": [], "tool_calls": [{"id": "call_3eb89cec-17f8-4cf6-beb3-f0883b6a1386", "type": "function", "function": {"name": "ai_agent_profile", "arguments": "{\"preferences\": \"[{'action': '\u589e\u52a0', 'demand': '\u82f1\u9633\u8054\u76df'}]\"}"}}]}, {"role": "tool", "text": "{\"message\": \"\u6536\u5230\u60a8\u7684\u5429\u5490\u4e86\uff0c\u53ef\u8fd9\u4e2a\u8981\u6c42\u597d\u96be\uff0c\u6682\u65f6\u505a\u4e0d\u5230\uff0c\u8bf7\u6362\u4e2a\u8bf4\u6cd5\u8bd5\u8bd5\uff01\"}", "files": [], "tool_calls": [{"id": "call_3eb89cec-17f8-4cf6-beb3-f0883b6a1386", "type": "function", "function": {"name": "ai_agent_profile", "arguments": "{\"preferences\": \"[{'action': '\u589e\u52a0', 'demand': '\u82f1\u9633\u8054\u76df'}]\"}"}}]}]round3
[{"role": "user", "text": "\u4e0d\u60f3\u770b\u65b0\u4eac\u62a5", "files": []}, {"role": "assistant", "text": "\u7528\u6237\u8868\u8fbe\u4e86\u4e0d\u60f3\u770b\u6765\u81ea\u201c\u65b0\u4eac\u62a5\u201d\u7684\u5185\u5bb9\uff0c\u8fd9\u6d89\u53ca\u5230\u8c03\u6574\u63a8\u8350\u5185\u5bb9\uff0c\u963b\u6b62\u7279\u5b9a\u6765\u6e90\u7684\u4fe1\u606f\u3002", "files": [], "tool_calls": [{"id": "222fed6b-c2fc-416d-8e0a-60c2d38a0a67", "type": "function", "function": {"name": "ai_agent_profile", "arguments": "{\"preferences\": \"[{'action': '\\u963b\\u6b62', 'demand': '\\u65b0\\u4eac\\u62a5'}]\"}"}}]}, {"role": "tool", "text": "{\"profile\": [{\"granularity\": \"TNAME\", \"type\": \"ALL\", \"content\": \"T1486538331796\", \"priority\": -1.0}], \"message\": \"\u5df2\u7ecf\u6839\u636e\u60a8\u7684\u5429\u5490\u8c03\u6574\u4e86\u63a8\u8350\u6a21\u5f0f\uff0c\u73b0\u5728\u60a8\u53ef\u4ee5\u53bb\u4e00\u63a2\u7a76\u7adf\u5566\uff01\"}", "files": [], "tool_calls": [{"id": "222fed6b-c2fc-416d-8e0a-60c2d38a0a67", "type": "function", "function": {"name": "ai_agent_profile", "arguments": "{\"preferences\": \"[{'action': '\\u963b\\u6b62', 'demand': '\\u65b0\\u4eac\\u62a5'}]\"}"}}]}, {"role": "assistant", "text": "\u6211\u5df2\u7ecf\u5e2e\u60a8\u8bbe\u7f6e\u597d\u4e86\uff0c\u60a8\u5c06\u4e0d\u518d\u770b\u5230\u65b0\u4eac\u62a5\u7684\u76f8\u5173\u4fe1\u606f\u3002", "files": []}, {"role": "user", "text": "\u60f3\u770b\u82f1\u96c4\u8054\u76df", "files": []}, {"role": "assistant", "text": "I can use ai_agent_profile.", "files": [], "tool_calls": [{"id": "8613338c-5e89-4e11-b675-762011a74f7e", "type": "function", "function": {"name": "ai_agent_profile", "arguments": "{\"preferences\": \"[{'action': '\\u589e\\u52a0', 'demand': '\\u82f1\\u9633\\u8054\\u76df'}]\"}"}}]}, {"role": "tool", "text": "{\"message\": \"\u6536\u5230\u60a8\u7684\u5429\u5490\u4e86\uff0c\u53ef\u8fd9\u4e2a\u8981\u6c42\u597d\u96be\uff0c\u6682\u65f6\u505a\u4e0d\u5230\uff0c\u8bf7\u6362\u4e2a\u8bf4\u6cd5\u8bd5\u8bd5\uff01\"}", "files": [], "tool_calls": [{"id": "8613338c-5e89-4e11-b675-762011a74f7e", "type": "function", "function": {"name": "ai_agent_profile", "arguments": "{\"preferences\": \"[{'action': '\\u589e\\u52a0', 'demand': '\\u82f1\\u9633\\u8054\\u76df'}]\"}"}}]}, {"role": "assistant", "text": "\u6682\u65f6\u65e0\u6cd5\u8bc6\u522b\u201c\u82f1\u9633\u8054\u76df\u201d\uff0c\u53ef\u80fd\u662f\u60a8\u8f93\u5165\u6709\u8bef\uff0c\u6216\u8005\u7684\u80fd\u529b\u6709\u9650\uff0c\u60a8\u53ef\u4ee5\u5c1d\u8bd5\u6362\u4e2a\u8bf4\u6cd5\u3002\u6bd4\u5982\uff0c\u5982\u679c\u60a8\u60f3\u770b\u82f1\u96c4\u8054\u76df\u7684\u65b0\u95fb\u6216\u8005\u8d5b\u4e8b\u4fe1\u606f\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u8f93\u5165\u201c\u82f1\u96c4\u8054\u76df\u65b0\u95fb\u201d\u6216\u8005\u201c\u82f1\u96c4\u8054\u76df\u8d5b\u4e8b\u201d\u3002", "files": []}, {"role": "user", "text": "\u591a\u63a8\u82f1\u96c4\u8054\u76df", "files": []}, {"role": "assistant", "text": "", "files": [], "tool_calls": [{"id": "call_f640f05c-eb9f-43f0-86ed-1397fabf2c37", "type": "function", "function": {"name": "ai_agent_profile", "arguments": "{\"preferences\": \"[{'action': '\u589e\u52a0', 'demand': '\u82f1\u9633\u8054\u76df'}]\"}"}}]}, {"role": "tool", "text": "{\"message\": \"\u6536\u5230\u60a8\u7684\u5429\u5490\u4e86\uff0c\u53ef\u8fd9\u4e2a\u8981\u6c42\u597d\u96be\uff0c\u6682\u65f6\u505a\u4e0d\u5230\uff0c\u8bf7\u6362\u4e2a\u8bf4\u6cd5\u8bd5\u8bd5\uff01\"}", "files": [], "tool_calls": [{"id": "call_f640f05c-eb9f-43f0-86ed-1397fabf2c37", "type": "function", "function": {"name": "ai_agent_profile", "arguments": "{\"preferences\": \"[{'action': '\u589e\u52a0', 'demand': '\u82f1\u9633\u8054\u76df'}]\"}"}}]}]Database records after prasing
[{'role': 'user', 'text': '不想看新京报', 'files': []}, {'role': 'assistant', 'text': '', 'files': [], 'tool_calls': [{'id': 'call_8a7e093f-8938-4d7c-81ac-65e43aa8fa3b', 'type': 'function', 'function': {'name': 'ai_agent_profile', 'arguments': '{"preferences": "[{\'action\': \'阻止\', \'demand\': \'新京报\'}]"}'}}]}, {'role': 'tool', 'text': '{"profile": [{"granularity": "TNAME", "type": "ALL", "content": "T1486538331796", "priority": -1.0}], "message": "已经根据您 的吩咐调整了推荐模式,现在您可以去一探究竟啦!"}', 'files': [], 'tool_calls': [{'id': 'call_8a7e093f-8938-4d7c-81ac-65e43aa8fa3b', 'type': 'function', 'function': {'name': 'ai_agent_profile', 'arguments': '{"preferences": "[{\'action\': \'阻止\', \'demand\': \'新京报\'}]"}'}}]}][{'role': 'user', 'text': '不想看新京报', 'files': []}, {'role': 'assistant', 'text': '用户表达了不想看来自“新京报”的内容,这涉及到调整推荐内容,阻止特定来源的信息。', 'files': [], 'tool_calls': [{'id': 'a7455157-a8ea-4a7c-8d21-529de2fdab0b', 'type': 'function', 'function': {'name': 'ai_agent_profile', 'arguments': '{"preferences": "[{\'action\': \'\\u963b\\u6b62\', \'demand\': \'\\u65b0\\u4eac\\u62a5\'}]"}'}}]}, {'role': 'tool', 'text': '{"profile": [{"granularity": "TNAME", "type": "ALL", "content": "T1486538331796", "priority": -1.0}], "message": "已经根据您的吩咐调整了推荐模式,现在您可以去一探究竟啦!"}', 'files': [], 'tool_calls': [{'id': 'a7455157-a8ea-4a7c-8d21-529de2fdab0b', 'type': 'function', 'function': {'name': 'ai_agent_profile', 'arguments': '{"preferences": "[{\'action\': \'\\u963b\\u6b62\', \'demand\':\'\\u65b0\\u4eac\\u62a5\'}]"}'}}]}, {'role': 'assistant', 'text': '我已经帮您设置好了,您将不再看到新京报的相关信息。', 'files': []}, {'role': 'user', 'text': '想看英雄联盟', 'files': []}, {'role': 'assistant', 'text': '', 'files': [], 'tool_calls': [{'id': 'call_3eb89cec-17f8-4cf6-beb3-f0883b6a1386', 'type': 'function', 'function': {'name': 'ai_agent_profile', 'arguments': '{"preferences": "[{\'action\': \'增加\', \'demand\': \'英阳联盟\'}]"}'}}]}, {'role': 'tool', 'text': '{"message": "收到您的吩咐了,可这个要求好难,暂时做不到,请换个说法试试!"}', 'files': [], 'tool_calls': [{'id': 'call_3eb89cec-17f8-4cf6-beb3-f0883b6a1386', 'type': 'function', 'function': {'name': 'ai_agent_profile', 'arguments': '{"preferences": "[{\'action\': \'增加\', \'demand\': \'英阳联盟\'}]"}'}}]}][{'role': 'user', 'text': '不想看新京报', 'files': []}, {'role': 'assistant', 'text': '用户表达了不想看来自“新京报”的内容,这涉及到调整推荐内容,阻止特定来源的信息。', 'files': [], 'tool_calls': [{'id': '222fed6b-c2fc-416d-8e0a-60c2d38a0a67', 'type': 'function', 'function': {'name': 'ai_agent_profile', 'arguments': '{"preferences": "[{\'action\': \'\\u963b\\u6b62\', \'demand\': \'\\u65b0\\u4eac\\u62a5\'}]"}'}}]}, {'role': 'tool', 'text': '{"profile": [{"granularity": "TNAME", "type": "ALL", "content": "T1486538331796", "priority": -1.0}], "message": "已经根据您的吩咐调整了推荐模式,现在您可以去一探究竟啦!"}', 'files': [], 'tool_calls': [{'id': '222fed6b-c2fc-416d-8e0a-60c2d38a0a67', 'type': 'function', 'function': {'name': 'ai_agent_profile', 'arguments': '{"preferences": "[{\'action\': \'\\u963b\\u6b62\', \'demand\': \'\\u65b0\\u4eac\\u62a5\'}]"}'}}]}, {'role': 'assistant', 'text': '我已经帮您设置好了,您将不再看到新京报的相关信息。', 'files': []}, {'role': 'user', 'text': '想看英雄联盟', 'files': []}, {'role': 'assistant', 'text': 'I can use ai_agent_profile.', 'files': [], 'tool_calls': [{'id': '8613338c-5e89-4e11-b675-762011a74f7e', 'type': 'function', 'function': {'name': 'ai_agent_profile', 'arguments': '{"preferences": "[{\'action\': \'\\u589e\\u52a0\', \'demand\': \'\\u82f1\\u9633\\u8054\\u76df\'}]"}'}}]}, {'role': 'tool', 'text': '{"message": "收到您的吩咐了,可这个要求好难,暂时做不到,请换个说法试试!"}', 'files': [], 'tool_calls': [{'id': '8613338c-5e89-4e11-b675-762011a74f7e', 'type': 'function', 'function': {'name': 'ai_agent_profile', 'arguments': '{"preferences": "[{\'action\': \'\\u589e\\u52a0\', \'demand\': \'\\u82f1\\u9633\\u8054\\u76df\'*}]"}'}}]}, {'role': 'assistant', 'text': '暂时无法识别“英阳联盟”,可能是您输入有误。', 'files': []}, {'role': 'user', 'text': '多推英雄联盟', 'files': []}, {'role': 'assistant', 'text': '', 'files': [], 'tool_calls': [{'id': 'call_f640f05c-eb9f-43f0-86ed-1397fabf2c37', 'type': 'function', 'function': {'name': 'ai_agent_profile', 'arguments': '{"preferences": "[{\'action\': \'增加\', \'demand\': \'英阳联盟\'}]"}'}}]}, {'role': 'tool', 'text': '{"message": "收到您的吩咐了,可这个要求好难,暂时做不到,请换个说法试试!"}', 'files': [], 'tool_calls': [{'id': 'call_f640f05c-eb9f-43f0-86ed-1397fabf2c37', 'type': 'function', 'function': {'name': 'ai_agent_profile', 'arguments': '{"preferences": "[{\'action\': \'增加\', \'demand\': \'英阳联盟\'}]"}'}}]}]✔️ Expected Behavior
"arguments": "{\"preferences\": \"[{'action': '\u963b\u6b62', 'demand': '\u65b0\u4eac\u62a5'}]\"}"}}❌ Actual Behavior
"arguments": "{\"preferences\": \"[{'action': '\\u963b\\u6b62', 'demand': '\\u65b0\\u4eac\\u62a5'}]\"}"}}@dosubot[bot] commented on GitHub (Aug 2, 2024):
@lidajiededa Hello! I'm here to assist you with any bugs, questions, or contributions for the repository. Let me know how I can help!
To resolve the encoding issue with "tool_calls" -> "function" -> "arguments" in multiple rounds of conversation, which is causing abnormal agent performance in later rounds, you should ensure that the arguments are properly concatenated and not corrupted over multiple rounds. The issue seems to be related to how the arguments are being accumulated.
In the
_handle_generate_stream_responsemethod, theincrease_tool_callfunction is responsible for updating the tool calls. Specifically, the linetool_call.function.arguments += new_tool_call.function.argumentsis where the arguments are concatenated. This can lead to issues if the arguments are not properly managed.Here is a potential fix to ensure that the arguments are correctly handled:
Additionally, ensure that the arguments are properly encoded as JSON strings to avoid encoding issues. The following snippet from the
FunctionCallAgentRunnerclass in the Dify platform demonstrates how to handle tool call arguments:This change ensures that the arguments are properly encoded as JSON strings, preventing potential corruption or encoding issues. Additionally, the
_handle_generate_stream_responsemethod has been updated to properly handle tool calls and ensure the integrity of the arguments over multiple rounds of conversation [1][2][3][4].To continue talking to Dosu, mention @dosu.
@FAFUuser commented on GitHub (Sep 4, 2024):
hello,In the created Agent application, when using custom tools (with both tool names and parameters in Chinese), the agent's thinking process occasionally encounters issues with Chinese character encoding, resulting in garbled text. Through debugging, I found that the garbled text appears in the resp within llm.py (xinference). Additionally, even when there is garbled text, the parameters are not correctly parsed during tool invocation. For example, the parameter '中坤' goes through the process: '中坤' --> garbled text --> '中移', which leads to errors.
@FAFUuser commented on GitHub (Sep 5, 2024):
@lidajiededa commented on GitHub (Sep 5, 2024):
Hello, I found that qwen2 has already generated Unicode encoding when calling the lowest level API, which is client.chat.completions, to generate content. When this generated content containing Unicode is passed into subsequent stages as history, it may be due to qwen2's insufficient understanding ability, resulting in garbled content in the end. Therefore, I directly decode the content generated by each "client. chat.completions" so that it does not contain Unicode, and there will be no garbled characters afterwards. You can try.
@FAFUuser commented on GitHub (Sep 5, 2024):
Indeed, when large models generate content, errors may occur. For example, the parameter I entered was “林德气体” but the output it gave was “\u672c\u5706\u6c14\u4f53”, which corresponds to the Chinese “本圆气体”.And there are many more such cases.
Do you have a respective solution strategy for the problem mentioned above?
@lidajiededa commented on GitHub (Sep 5, 2024):
@FAFUuser In my usage process, this situation usually occurs in multiple rounds of conversations, and there is usually no problem with replying to the first question. But if the answer to the first question includes Unicode, and it is passed into subsequent conversations as history, an error will occur. So my solution is not to let answers containing Unicode be passed into subsequent conversations. Specifically, first determine whether the tool has been called. If it has been called, immediately after generating the answer, decode the Unicode in the answer into Chinese.
@FAFUuser commented on GitHub (Sep 5, 2024):
@lidajiededa Actually, my issue is different although it might seem similar. I encounter garbled text even in the first round of conversation. Thank you very much for the discussion; I've learned a lot.