test(opencode): cover native Gemini parity

This commit is contained in:
Kit Langton
2026-04-26 20:41:32 -04:00
parent a26f2c905f
commit 33ef3b01f8
4 changed files with 99 additions and 5 deletions
+6 -1
View File
@@ -1,4 +1,5 @@
import {
AmazonBedrock,
Anthropic,
GitHubCopilot,
Google,
@@ -23,6 +24,7 @@ type Input = {
}
const PROVIDERS: Record<string, ProviderDefinition> = {
"@ai-sdk/amazon-bedrock": AmazonBedrock.provider,
"@ai-sdk/anthropic": Anthropic.provider,
"@ai-sdk/baseten": OpenAICompatibleFamily.provider,
"@ai-sdk/cerebras": OpenAICompatibleFamily.provider,
@@ -102,8 +104,11 @@ const capabilities = (input: Input, selected: Protocol) =>
streamingInput: selected !== "gemini" && input.model.capabilities.toolcall,
},
cache: {
// Both Anthropic Messages and Bedrock Converse honour positional cache
// markers — Anthropic via `cache_control` on content blocks, Bedrock via
// its `cachePoint` marker block (added to BedrockConverse in 9d7d518ac).
prompt: ["anthropic-messages", "bedrock-converse"].includes(selected),
contentBlocks: selected === "anthropic-messages",
contentBlocks: ["anthropic-messages", "bedrock-converse"].includes(selected),
},
reasoning: {
efforts: reasoningEfforts(input),
+1 -1
View File
@@ -163,7 +163,7 @@ export const toolDefinition = (input: { readonly model: Provider.Model; readonly
LLM.tool({
name: input.tool.id,
description: input.tool.description,
inputSchema: Object.fromEntries(Object.entries(EffectZod.toJsonSchema(input.tool.parameters))),
inputSchema: EffectZod.toJsonSchema(input.tool.parameters),
native: {
opencodeToolID: input.tool.id,
},