Skip to content

fix(agentstudio): multiagent, output file download feature support - #181

Merged
luk384090-cloud merged 2 commits into
mainfrom
dev/agent-issue-fix
Aug 25, 2026
Merged

fix(agentstudio): multiagent, output file download feature support#181
luk384090-cloud merged 2 commits into
mainfrom
dev/agent-issue-fix

Conversation

@foleydang

@foleydang foleydang commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator
  • agents.create/update accept multiagent (coordinator roster); Agent responses hydrate it into MultiAgentConfig / MultiAgentRosterEntry.
  • files.download() returns FileContent, a bytes subclass with write_to_file(); sync and async.
  • sessions.create accepts vault_ids (create-only per the protocol; the update path does not take it).
  • Message declares the top-level thread_id the server sends on every thread_* event, so subagent thread ids no longer fall into extra.

Verified against the pre-maas backend: roster create / update / clear, plus the four server-side rejections (two selfs, >20 entries, Anthropic's string shorthand, unknown entry type), and a live coordinator delegation run emitting 7 thread_* events with the subagent result returned to the coordinator.

Description

[Describe what this PR does and why]

Related Issue: Fixes #[issue_number] or Relates to #[issue_number]

Security Considerations: [Check if API keys or sensitive credentials are exposed in code/logs]

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Refactoring

Component(s) Affected

  • Model
  • Application
  • Common
  • Documentation
  • Tests
  • CI/CD

Checklist

  • Pre-commit hooks pass
  • Tests pass locally
  • Documentation updated (if needed)
  • Ready for review

Testing

[How to test these changes]

Additional Notes

[Optional: any other context]

…d_id

- agents.create/update accept `multiagent` (coordinator roster); Agent
  responses hydrate it into MultiAgentConfig / MultiAgentRosterEntry.
- files.download() returns FileContent, a bytes subclass with
  write_to_file(); sync and async.
- sessions.create accepts vault_ids (create-only per the protocol; the
  update path does not take it).
- Message declares the top-level thread_id the server sends on every
  thread_* event, so subagent thread ids no longer fall into `extra`.

Verified against the pre-maas backend: roster create / update / clear,
plus the four server-side rejections (two selfs, >20 entries, Anthropic's
string shorthand, unknown entry type), and a live coordinator delegation
run emitting 7 thread_* events with the subagent result returned to the
coordinator.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread dashscope/agentstudio/types/params.py Outdated
Comment thread dashscope/agentstudio/types/params.py Outdated
Comment thread dashscope/agentstudio/resources/files.py
Review feedback: `dict(multiagent)` raises TypeError when the caller
passes the MultiAgentConfig read off a response, which breaks the
natural read-modify-write flow (update already requires the version, so
callers retrieve first). Use the file's existing `_to_mapping` helper,
already used for the deployment agent/schedule/resources params: it
tries to_dict() first, then Mapping.

Also drop the async `_open_content` note claiming the service may answer
302 with a pre-signed URL and that redirects are followed. Both halves
are wrong: the protocol says §6.3 returns the byte stream directly and
does not hand out pre-signed URLs in P1, and the httpx clients are built
without follow_redirects (default False), so a 302 would silently yield
zero bytes. The two docstrings now match, and match the code.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@luk384090-cloud
luk384090-cloud self-requested a review August 25, 2026 03:44
@luk384090-cloud
luk384090-cloud merged commit 6aec6b6 into main Aug 25, 2026
3 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.

2 participants