Skip to content

refactor(model)!: remove obsolete llm polling context fields#350

Merged
WH-2099 merged 3 commits into
langgenius:mainfrom
QuantumGhost:refactor/model-polling-remove-obsolete-context
Jun 16, 2026
Merged

refactor(model)!: remove obsolete llm polling context fields#350
WH-2099 merged 3 commits into
langgenius:mainfrom
QuantumGhost:refactor/model-polling-remove-obsolete-context

Conversation

@QuantumGhost

Copy link
Copy Markdown
Contributor

AI disclosure: This PR was primarily drafted with Codex using GPT-5.4.
I have reviewed and edited the final diff, and I am responsible for the content.

Related Issue

Closes #349

Summary

  • remove workflow_run_id and node_id from the LLM polling daemon request schema
  • remove the same obsolete fields from the LargeLanguageModel polling method signatures
  • stop forwarding those fields in PluginExecutor
  • add a clear migration guard for legacy polling providers that still implement the old keyword-only parameters
  • update polling tests to cover the narrowed contract and the legacy-signature failure mode

Compatibility Impact

This is a breaking API change for plugin authors who implement polling-capable LargeLanguageModel providers against the SDK. Existing implementations must remove workflow_run_id and node_id from _start_polling and _check_polling before upgrading.

Target release: the next incompatible SDK release after 0.9.0. The exact version number is still to be decided by maintainers.

Validation

  • uv run pytest tests/test_model_polling.py -q
  • just check
  • just build
  • just test still reports the pre-existing integration environment error in tests/integration/test_invoke_llm.py::test_invoke_llm, where python -m tests.__mock_server fails with ModuleNotFoundError: No module named 'tests' in this worktree\n\n# Pull Request Checklist\n\n## Compatibility Check\n\n- [x] I have checked whether this change affects the backward compatibility of the plugin declared in README.md\n- [x] I have checked whether this change affects the forward compatibility of the plugin declared in README.md\n- [ ] If this change introduces a breaking change, I have discussed it with the project maintainer and specified the release version in the README.md\n- [ ] I have described the compatibility impact and the corresponding version number in the PR description\n- [x] I have checked whether the plugin version is updated in the README.md\n\n## Available Checks\n\n- [x] just build has passed\n- [x] Relevant documentation has been updated (if necessary)

@QuantumGhost QuantumGhost self-assigned this Jun 16, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes the obsolete workflow_run_id and node_id parameters from the LLM polling interface across requests, executors, and the LargeLanguageModel base class. It also adds a runtime check to raise a migration error if legacy plugins still implement the outdated polling interface, and updates the test suite accordingly. Feedback on the changes suggests keeping json_schema as a keyword-only argument in start_polling to maintain consistency with _start_polling and prevent positional argument abuse.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/dify_plugin/interfaces/model/large_language_model.py
@QuantumGhost QuantumGhost marked this pull request as ready for review June 16, 2026 15:56
@WH-2099 WH-2099 merged commit f423b93 into langgenius:main Jun 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove obsolete workflow_run_id and node_id from LLM polling protocol

2 participants