Skip to content

v2.0.2

Choose a tag to compare

@luk384090-cloud luk384090-cloud released this 27 Oct 02:58
· 142 commits to main since this release
f2a915e

What's Changed

✨ Features

agentstudio: inference parameters in agent model config (#217)
ModelConfig now carries the four optional inference parameters of the Managed Agent API — temperature, max_tokens, enable_thinking, and thinking_budget — and is exported from dashscope.agentstudio. agents.create / agents.update accept either a ModelConfig or a bare model id, while Agent.model coerces the server object and Agent.model_id reads the id alone. Unset parameters are omitted so the server default applies; on update a sent config replaces the whole object, so use agent.model.copy_with(...) to change one knob without clearing the rest. copy_with also tolerates forward-compat fields already present on the config, while typos and invented fields still raise.

🐛 Bug Fixes

observability: emit reasoning content in LLM output message spans (#218)
The OpenAI and DashScope output-message converters were silently dropping reasoning_content, so chat spans never echoed model thinking even though the Reasoning part was supported in the schema. Reasoning is now exported from the _core facade and inserted as the first part when present.

observability: fix tool span arguments recording (#218)
typing.Dict was used where dict (the builtin) was required for instantiation, causing a TypeError that the broad except swallowed — every @observe_tool span recorded {"_error": "could_not_bind_arguments"} instead of the real arguments. Switched to the builtin dict so binding succeeds.

observability: graceful degradation without Reasoning facade (#218)
Reasoning is now imported in a nested try so environments with loongsuite-util-genai < 0.4.0 degrade to missing reasoning parts instead of setting GENAI_AVAILABLE=False and disabling the entire tracing layer.

agentstudio: prevent double-read on response streams (#217)
The agent response stream wraps a single-use EventSource, so iterating it a second time silently produced nothing (or StreamClosedError after close), making it look like an empty turn. A second pass now raises a clear error directing callers to open another stream.

👥 Contributors

Full Changelog: v2.0.1...v2.0.2