chore(deadcode): drop unused llm provider helpers · openclaw/openclaw@dafd98d
vincentkoc
·
2026-06-21
·
via Recent Commits to openclaw:main
File tree
agents/embedded-agent-runner
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2,7 +2,6 @@
|
2 | 2 | import type { StreamFn } from "openclaw/plugin-sdk/agent-core"; |
3 | 3 | import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; |
4 | 4 | import { createLlmStreamSimpleMock } from "../../../test/helpers/agents/llm-stream-simple-mock.js"; |
5 | | -import { isOpenRouterAnthropicModelRef } from "../../llm/providers/stream-wrappers/anthropic-family-cache-semantics.js"; |
6 | 5 | import { testing as extraParamsTesting, applyExtraParamsToAgent } from "./extra-params.js"; |
7 | 6 | import { resolveCacheRetention } from "./prompt-cache-retention.js"; |
8 | 7 | |
@@ -324,11 +323,3 @@ describe("cacheRetention default behavior", () => {
|
324 | 323 | ).toBeUndefined(); |
325 | 324 | }); |
326 | 325 | }); |
327 | | - |
328 | | -describe("anthropic-family cache semantics", () => { |
329 | | -it("classifies OpenRouter Anthropic model refs centrally", () => { |
330 | | -expect(isOpenRouterAnthropicModelRef("openrouter", "anthropic/claude-opus-4-6")).toBe(true); |
331 | | -expect(isOpenRouterAnthropicModelRef("openrouter", "google/gemini-2.5-pro")).toBe(false); |
332 | | -expect(isOpenRouterAnthropicModelRef("OpenRouter", "Anthropic/Claude-Sonnet-4")).toBe(true); |
333 | | -}); |
334 | | -}); |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -914,17 +914,3 @@ export async function consumeGoogleGenerateContentStream<T extends GoogleApiType
|
914 | 914 | }); |
915 | 915 | params.stream.end(); |
916 | 916 | } |
917 | | - |
918 | | -/** |
919 | | - * Map string finish reason to our StopReason (for raw API responses). |
920 | | - */ |
921 | | -export function mapStopReasonString(reason: string): StopReason { |
922 | | -switch (reason) { |
923 | | -case "STOP": |
924 | | -return "stop"; |
925 | | -case "MAX_TOKENS": |
926 | | -return "length"; |
927 | | -default: |
928 | | -return "error"; |
929 | | -} |
930 | | -} |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -46,12 +46,6 @@ export function isAnthropicBedrockModel(modelId: string): boolean {
|
46 | 46 | return false; |
47 | 47 | } |
48 | 48 | |
49 | | -export function isOpenRouterAnthropicModelRef(provider: string, modelId: string): boolean { |
50 | | -return ( |
51 | | -normalizeOptionalLowercaseString(provider) === "openrouter" && isAnthropicModelRef(modelId) |
52 | | -); |
53 | | -} |
54 | | - |
55 | 49 | export function isAnthropicFamilyCacheTtlEligible(params: { |
56 | 50 | provider: string; |
57 | 51 | modelApi?: string; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。