* Extensions: fix oxfmt drift on main * Plugins: restore runtime barrel exports on main * Config: restore web search compatibility types * Telegram: align test harness with reply runtime * Plugin SDK: fix channel config accessor generics * CLI: remove redundant search provider casts * Tests: restore main typecheck coverage * Lobster: fix test import formatting * Extensions: route bundled seams through plugin-sdk * Tests: use extension env helper for xai * Image generation: fix main oxfmt drift * Config: restore latest main compatibility checks * Plugin SDK: align guardrail tests with lint * Telegram: type native command skill mock
46 lines
1.4 KiB
TypeScript
46 lines
1.4 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { registerSingleProviderPlugin } from "../../test/helpers/extensions/plugin-registration.js";
|
|
import amazonBedrockPlugin from "./index.js";
|
|
|
|
describe("amazon-bedrock provider plugin", () => {
|
|
it("marks Claude 4.6 Bedrock models as adaptive by default", () => {
|
|
const provider = registerSingleProviderPlugin(amazonBedrockPlugin);
|
|
|
|
expect(
|
|
provider.resolveDefaultThinkingLevel?.({
|
|
provider: "amazon-bedrock",
|
|
modelId: "us.anthropic.claude-opus-4-6-v1",
|
|
} as never),
|
|
).toBe("adaptive");
|
|
expect(
|
|
provider.resolveDefaultThinkingLevel?.({
|
|
provider: "amazon-bedrock",
|
|
modelId: "amazon.nova-micro-v1:0",
|
|
} as never),
|
|
).toBeUndefined();
|
|
});
|
|
|
|
it("disables prompt caching for non-Anthropic Bedrock models", () => {
|
|
const provider = registerSingleProviderPlugin(amazonBedrockPlugin);
|
|
const wrapped = provider.wrapStreamFn?.({
|
|
provider: "amazon-bedrock",
|
|
modelId: "amazon.nova-micro-v1:0",
|
|
streamFn: (_model: unknown, _context: unknown, options: Record<string, unknown>) => options,
|
|
} as never);
|
|
|
|
expect(
|
|
wrapped?.(
|
|
{
|
|
api: "openai-completions",
|
|
provider: "amazon-bedrock",
|
|
id: "amazon.nova-micro-v1:0",
|
|
} as never,
|
|
{ messages: [] } as never,
|
|
{},
|
|
),
|
|
).toMatchObject({
|
|
cacheRetention: "none",
|
|
});
|
|
});
|
|
});
|