Skip to content

v2.1.4

Choose a tag to compare

@github-actions github-actions released this 02 Dec 05:20
· 28 commits to main since this release
11bdc86

v2.1.4 Release Notes

πŸš€ Highlights

  • Conversation trajectories in reward input β€” the agentic RL (reinforcement fine-tuning) RewardInput model now accepts an optional trajectories field, so reward requests can carry the full conversation history of a session alongside the agent output. This is a fully backward-compatible, additive change: existing reward payloads are unaffected. (#254)

✨ Features

  • reinforcement: add trajectories to reward input (#254, cc4e24b)
    • New Trajectory Pydantic model in dashscope/applications/finetune/reinforcement/component/data/reward_input.py, describing the conversation history of one trajectory in a session:
      • trajectory_id: Optional[int] β€” identifier of the trajectory (defaults to None)
      • prompt: Optional[List[Dict[str, Any]]] β€” the prompt messages (defaults to None)
      • completions: List[Dict[str, Any]] β€” the completion messages (required)
    • New optional field RewardInput.trajectories: Optional[List[Trajectory]] (defaults to None) for trajectories captured during a session.
    • Serialization goes through the existing model_dump(exclude_none=True) path, so unset trajectory fields are omitted from the wire payload; extra="allow" continues to preserve unknown keys.

πŸ› Bug Fixes

  • reinforcement: address trajectory review feedback (809f86a)
    • Gave trajectory_id and prompt explicit = None defaults so a minimal trajectory containing only completions parses correctly.
    • Removed the exclude_if field option (only available in newer Pydantic releases), keeping the implementation compatible with the declared pydantic>=2.0 dependency; None exclusion is already handled by model_dump(exclude_none=True).
    • Added regression tests in tests/legacy_1x/unit/test_agentic_rl_components.py covering minimal trajectory parsing, optional-field defaults, None exclusion with exclude_none=True, and extra-key preservation.

♻️ Refactoring

None

πŸ“š Documentation

None

πŸ”§ CI & Chore

  • version: bump version to 2.1.4 (64da577)
  • tests: apply pre-commit formatting (cc15d12) and format the trajectory regression test (a26c2ce)

⚠️ Breaking Changes

None


πŸ“¦ Installation

pip install --upgrade dashscope==2.1.4

Standalone CLI binaries for Linux (x86_64), macOS (arm64 / x86_64) and Windows (x86_64), plus SHA256 checksums, are attached as release assets.

πŸ‘₯ Contributors

Thanks to all the contributors who made this release possible:

πŸ“ Full Changelog

v2.1.3...v2.1.4