Skip to content

Commit b8069c2

Browse files
committed
refactor: trim provider model compat seams
1 parent 78160b5 commit b8069c2

File tree

5 files changed

+23
-47
lines changed

5 files changed

+23
-47
lines changed

docs/plugins/sdk-overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ subpaths is in `scripts/lib/plugin-sdk-entrypoints.json`.
6868
| --- | --- |
6969
| `plugin-sdk/cli-backend` | CLI backend defaults + watchdog constants |
7070
| `plugin-sdk/provider-auth` | `createProviderApiKeyAuthMethod`, `ensureApiKeyFromOptionEnvOrPrompt`, `upsertAuthProfile` |
71+
| `plugin-sdk/provider-models` | Compat provider model aliases |
7172
| `plugin-sdk/provider-model-shared` | `normalizeModelCompat` |
7273
| `plugin-sdk/provider-catalog-shared` | `findCatalogTemplate`, `buildSingleProviderApiKeyCatalog` |
7374
| `plugin-sdk/provider-catalog` | Compat provider builder aliases |

src/agents/minimax-docs.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
MINIMAX_DEFAULT_MODEL_ID,
66
MINIMAX_DEFAULT_MODEL_REF,
77
MINIMAX_TEXT_MODEL_REFS,
8-
} from "../plugins/provider-model-minimax.js";
8+
} from "../plugin-sdk/minimax.js";
99

1010
const repoRoot = path.resolve(import.meta.dirname, "../..");
1111
const testingDoc = fs.readFileSync(path.join(repoRoot, "docs/help/testing.md"), "utf8");

src/auto-reply/thinking.shared.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { matchesExactOrPrefix } from "../plugins/provider-model-helpers.js";
1+
import { matchesExactOrPrefix } from "../plugin-sdk/provider-model-shared.js";
22

33
export type ThinkLevel = "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "adaptive";
44
export type VerboseLevel = "off" | "on" | "full";

src/plugin-sdk/provider-models.ts

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,35 @@
11
// Public model/catalog helpers for provider plugins.
22

3-
import type { BedrockDiscoveryConfig, ModelDefinitionConfig } from "../config/types.models.js";
3+
export type {
4+
BedrockDiscoveryConfig,
5+
KilocodeModelCatalogEntry,
6+
ModelApi,
7+
ModelDefinitionConfig,
8+
ModelProviderConfig,
9+
ProviderPlugin,
10+
} from "./provider-model-shared.js";
411

5-
export type { ModelApi, ModelProviderConfig } from "../config/types.models.js";
6-
export type { BedrockDiscoveryConfig, ModelDefinitionConfig } from "../config/types.models.js";
7-
export type { ProviderPlugin } from "../plugins/types.js";
8-
export type { KilocodeModelCatalogEntry } from "../plugins/provider-model-kilocode.js";
9-
10-
export { DEFAULT_CONTEXT_TOKENS } from "../agents/defaults.js";
1112
export {
13+
DEFAULT_CONTEXT_TOKENS,
14+
cloneFirstTemplateModel,
15+
createMoonshotThinkingWrapper,
1216
hasNativeWebSearchTool,
1317
HTML_ENTITY_TOOL_CALL_ARGUMENTS_ENCODING,
14-
normalizeModelCompat,
15-
resolveToolCallArgumentsEncoding,
16-
usesXaiToolSchemaProfile,
17-
XAI_TOOL_SCHEMA_PROFILE,
18-
} from "../agents/model-compat.js";
19-
export { normalizeProviderId } from "../agents/provider-id.js";
20-
export { applyXaiModelCompat, normalizeXaiModelId } from "./xai.js";
21-
export {
22-
createMoonshotThinkingWrapper,
23-
resolveMoonshotThinkingType,
24-
} from "../agents/pi-embedded-runner/moonshot-thinking-stream-wrappers.js";
25-
export {
26-
cloneFirstTemplateModel,
18+
isMiniMaxModernModelId,
2719
matchesExactOrPrefix,
28-
} from "../plugins/provider-model-helpers.js";
29-
export {
3020
MINIMAX_DEFAULT_MODEL_ID,
3121
MINIMAX_DEFAULT_MODEL_REF,
3222
MINIMAX_TEXT_MODEL_CATALOG,
3323
MINIMAX_TEXT_MODEL_ORDER,
3424
MINIMAX_TEXT_MODEL_REFS,
35-
isMiniMaxModernModelId,
36-
} from "./minimax.js";
25+
normalizeModelCompat,
26+
normalizeProviderId,
27+
resolveMoonshotThinkingType,
28+
resolveToolCallArgumentsEncoding,
29+
usesXaiToolSchemaProfile,
30+
XAI_TOOL_SCHEMA_PROFILE,
31+
} from "./provider-model-shared.js";
32+
export { applyXaiModelCompat, normalizeXaiModelId } from "./xai.js";
3733

3834
// Deprecated compat aliases. Prefer provider-specific subpaths.
3935
export { applyGoogleGeminiModelDefault, GOOGLE_GEMINI_DEFAULT_MODEL } from "./google.js";

src/plugins/provider-model-minimax.ts

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)