Skip to content

feat(plugin): add session HTTP middleware - #40327

Merged
rekram1-node merged 14 commits into
v2from
session-http-integration
Aug 4, 2026
Merged

feat(plugin): add session HTTP middleware#40327
rekram1-node merged 14 commits into
v2from
session-http-integration

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add an Effect-native HTTP execution seam in packages/ai
  • expose a normal ctx.session.hook("http", event => event.use(...)) hook in Effect and Promise plugin APIs
  • adapt Effect HTTP types to Web types at the Core plugin boundary
  • expose raw HTTP statuses before provider error classification, allowing response normalization and retries
  • preserve request method, headers, body, response streaming, request attribution, bodyless statuses, cancellation, and middleware error messages
  • migrate the built-in OpenAI hook and remove the superseded request-transform API

The HTTP hook currently applies only to native models. The AI SDK path is intentionally unchanged.

Testing

  • root bun typecheck across all packages
  • bun test test/compile.test.ts test/executor.test.ts in packages/ai
  • bun test test/plugin/promise.test.ts test/plugin/provider-openai.test.ts test/session-runner.test.ts test/session-runner-recorded.test.ts in packages/core
  • production builds for packages/ai and packages/plugin

@rekram1-node
rekram1-node force-pushed the session-http-integration branch from 9636660 to 0a80062 Compare August 3, 2026 21:57
@rekram1-node
rekram1-node changed the base branch from native-http-middleware to v2 August 3, 2026 21:59
@rekram1-node rekram1-node changed the title feat(plugin): add session HTTP hook feat(plugin): add session HTTP middleware Aug 4, 2026
@rekram1-node
rekram1-node merged commit aa820db into v2 Aug 4, 2026
7 of 8 checks passed
@rekram1-node
rekram1-node deleted the session-http-integration branch August 4, 2026 14:15
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