Repository navigation
v2.1.4
v2.1.4 Release Notes
π Highlights
- Conversation trajectories in reward input β the agentic RL (reinforcement fine-tuning)
RewardInputmodel now accepts an optionaltrajectoriesfield, 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
TrajectoryPydantic model indashscope/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 toNone)prompt: Optional[List[Dict[str, Any]]]β the prompt messages (defaults toNone)completions: List[Dict[str, Any]]β the completion messages (required)
- New optional field
RewardInput.trajectories: Optional[List[Trajectory]](defaults toNone) 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.
- New
π Bug Fixes
- reinforcement: address trajectory review feedback (
809f86a)- Gave
trajectory_idandpromptexplicit= Nonedefaults so a minimal trajectory containing onlycompletionsparses correctly. - Removed the
exclude_iffield option (only available in newer Pydantic releases), keeping the implementation compatible with the declaredpydantic>=2.0dependency;Noneexclusion is already handled bymodel_dump(exclude_none=True). - Added regression tests in
tests/legacy_1x/unit/test_agentic_rl_components.pycovering minimal trajectory parsing, optional-field defaults,Noneexclusion withexclude_none=True, and extra-key preservation.
- Gave
β»οΈ 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.4Standalone 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: