Compare commits

...
1 Commits
Author SHA1 Message Date
Aiden Cline 481defdf4e fix(ai): disable bedrock mantle responses websockets 2026-08-25 22:23:11 -05:00
2 changed files with 26 additions and 0 deletions
@@ -29,6 +29,11 @@ export interface Settings extends ProviderPackage.Settings {
const responsesRoute = OpenAIResponses.route.with({
id: "bedrock-mantle-responses",
provider: id,
transport: OpenAIResponses.channelTransport({
id: "bedrock-mantle-responses",
name: "Bedrock Mantle Responses",
enabled: () => false,
}),
})
const chatRoute = OpenAIChat.route.with({
@@ -59,6 +59,27 @@ describe("Amazon Bedrock Mantle provider", () => {
}),
)
it.effect("keeps Responses on HTTP when a WebSocket executor is available", () =>
Effect.gen(function* () {
const model = AmazonBedrockMantle.configure({ apiKey: "test-key" }).responses("openai.gpt-oss-120b")
yield* LLMClient.generate(LLM.request({ model, prompt: "Hi" }), {
webSocket: { execute: () => Effect.die("unexpected Mantle WebSocket request") },
}).pipe(
Effect.provide(
dynamicResponse((input) => {
expect(input.request.url).toBe("https://bedrock-mantle.us-east-1.api.aws/v1/responses")
return Effect.succeed(
input.respond(sseEvents({ type: "response.completed", response: {} }), {
headers: { "content-type": "text/event-stream" },
}),
)
}),
),
)
}),
)
it.effect("supports bearer authentication and custom base URLs", () =>
Effect.gen(function* () {
const seen: Array<{ readonly url: string; readonly authorization: string | undefined }> = []