mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-09 16:21:15 +00:00
refactor(providers): tighten family outlier contracts
This commit is contained in:
@@ -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",
|
||||
|
||||
7
extensions/github-copilot/replay-policy.ts
Normal file
7
extensions/github-copilot/replay-policy.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export function buildGithubCopilotReplayPolicy(modelId?: string) {
|
||||
return (modelId?.toLowerCase() ?? "").includes("claude")
|
||||
? {
|
||||
dropThinkingBlocks: true,
|
||||
}
|
||||
: {};
|
||||
}
|
||||
Reference in New Issue
Block a user