refactor(providers): tighten family outlier contracts

This commit is contained in:
Vincent Koc
2026-04-05 11:09:26 +09:00
parent 6ab1b43081
commit b56517b0ee
7 changed files with 174 additions and 66 deletions

View File

@@ -11,18 +11,11 @@ import {
resolveCopilotForwardCompatModel,
wrapCopilotProviderStream,
} from "./register.runtime.js";
import { buildGithubCopilotReplayPolicy } from "./replay-policy.js";
const COPILOT_ENV_VARS = ["COPILOT_GITHUB_TOKEN", "GH_TOKEN", "GITHUB_TOKEN"];
const COPILOT_XHIGH_MODEL_IDS = ["gpt-5.2", "gpt-5.2-codex"] as const;
function buildGithubCopilotReplayPolicy(modelId?: string) {
return (modelId?.toLowerCase() ?? "").includes("claude")
? {
dropThinkingBlocks: true,
}
: {};
}
export default definePluginEntry({
id: "github-copilot",
name: "GitHub Copilot Provider",

View File

@@ -0,0 +1,7 @@
export function buildGithubCopilotReplayPolicy(modelId?: string) {
return (modelId?.toLowerCase() ?? "").includes("claude")
? {
dropThinkingBlocks: true,
}
: {};
}