Skip to content

fix: support anthropic stream requests#62

Open
cUp1d wants to merge 1 commit intoPsiACE:mainfrom
cUp1d:main
Open

fix: support anthropic stream requests#62
cUp1d wants to merge 1 commit intoPsiACE:mainfrom
cUp1d:main

Conversation

@cUp1d
Copy link

@cUp1d cUp1d commented Feb 18, 2026

Related Issue

Fixes #46

Modification

  • Switch ModelRunner from run_tools_async to stream_events_async for Anthropic stream compatibility.
  • Only pass parallel_tool_calls=False for anthropic / vertexaianthropic models to avoid breaking non-Anthropic providers.
  • Prioritize stream error handling before tool-followup decisions, so failed final events are not treated as successful tool continuation.
  • Add regression tests for:
    • non-Anthropic path not receiving parallel_tool_calls
    • stream error taking precedence over tool follow-up
  • Keep related tape-context stream compatibility updates and corresponding tests in this PR.
  • Use ASCII status tags ([OK] / [ERROR]) in telegram_send.py for PowerShell-friendly output.

Tests

  • Existing tests: uv run pytest passed
  • Manual verification: covered by regression scenarios for Anthropic stream error + provider compatibility paths

Code Quality Checks

  • uv run ruff check . passed
  • uv run mypy passed

- switch model runner to stream_events parsing for anthropic stream compatibility

- only pass parallel_tool_calls=False for anthropic/vertexaianthropic

- prioritize stream errors before tool follow-up decisions

- add regression coverage for stream event compatibility and error handling
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.

Anthropic provider: non-streaming methods fail

1 participant

Comments