Skip to content

fix: restore baseline relay test behavior - #15

Merged
lyz52789 merged 1 commit into
mainfrom
agent/fix-baseline-go-tests
Jul 12, 2026
Merged

fix: restore baseline relay test behavior#15
lyz52789 merged 1 commit into
mainfrom
agent/fix-baseline-go-tests

Conversation

@lyz52789

Copy link
Copy Markdown

What changed

  • restore Claude relay handling for inline PDF and plain-text file content while skipping unsupported file types
  • preserve a caller-provided StreamStatus instead of replacing it at stream startup

Why

The existing baseline tests exposed two regressions:

  • generalized media conversion lost the filename-derived MIME type and treated file content as an image
  • StreamScannerHandler unconditionally replaced a pre-initialized status, discarding errors already recorded by its caller

Scope

This PR is separate from #14 so the Responses arguments compatibility patch remains independently reviewable and deployable.

Validation

The failures were reproduced on origin/main before applying these changes. After the fix, the full Go suite passes from a clean worktree prepared the same way as the Docker build:

mkdir -p web/dist
cp web/index.html web/dist/index.html
go test ./... -count=1

@lyz52789
lyz52789 marked this pull request as ready for review July 12, 2026 08:26
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying new-api with  Cloudflare Pages  Cloudflare Pages

Latest commit: ea58e9a
Status: ✅  Deploy successful!
Preview URL: https://238eb3d7.new-api-d57.pages.dev
Branch Preview URL: https://agent-fix-baseline-go-tests.new-api-d57.pages.dev

View logs

@lyz52789
lyz52789 merged commit 3d6ca18 into main Jul 12, 2026
2 checks passed
@lyz52789
lyz52789 deleted the agent/fix-baseline-go-tests branch July 12, 2026 08:33
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.

1 participant