Skip to content

Commit e8895f0

Browse files
committed
docs: document model selection helpers
1 parent 8e9a4e9 commit e8895f0

22 files changed

Lines changed: 66 additions & 0 deletions

src/agents/model-catalog-browse.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* Loads model catalog views for browse/search UI surfaces.
3+
*/
14
import {
25
clampTimerTimeoutMs,
36
resolveTimerTimeoutMs,

src/agents/model-catalog-lookup.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* Looks up model catalog entries and input capability support.
3+
*/
14
import { normalizeProviderId } from "@openclaw/model-catalog-core/provider-id";
25
import {
36
normalizeLowercaseStringOrEmpty,

src/agents/model-catalog-scope.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* Resolves model catalog scope from config and discovery options.
3+
*/
14
import {
25
findNormalizedProviderValue,
36
normalizeProviderId,

src/agents/model-catalog.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* Loads bundled, manifest, and discovered model catalog entries.
3+
*/
14
import { readFile } from "node:fs/promises";
25
import { join } from "node:path";
36
import { normalizeProviderId } from "@openclaw/model-catalog-core/provider-id";

src/agents/model-fallback.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* Runs model and image fallback chains across provider/model candidates.
3+
*/
14
import { normalizeOptionalString } from "@openclaw/normalization-core/string-coerce";
25
import { sanitizeForLog } from "../../packages/terminal-core/src/ansi.js";
36
import {

src/agents/model-fallback.types.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* Shared candidate and attempt types for model fallback execution.
3+
*/
14
import type { FailoverReason } from "./embedded-agent-helpers/types.js";
25

36
// Shared model fallback record types used by selection, observation, and retry

src/agents/model-picker-visibility.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* Filters provider/model refs for model picker visibility.
3+
*/
14
import { normalizeProviderId } from "@openclaw/model-catalog-core/provider-id";
25
import type { OpenClawConfig } from "../config/types.openclaw.js";
36
import { listCliRuntimeProviderIds } from "./cli-backends.js";

src/agents/model-provider-auth-state.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* Process-local state for warmed provider auth snapshots.
3+
*/
14
export type PreparedProviderAuthState = {
25
agentId: string;
36
configFingerprint: string;

src/agents/model-provider-auth.worker.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* Worker entrypoint for warming provider auth state off the main thread.
3+
*/
14
import { parentPort, workerData } from "node:worker_threads";
25
import type { OpenClawConfig } from "../config/types.openclaw.js";
36
import { replaceRuntimeAuthProfileStoreSnapshots, type AuthProfileStore } from "./auth-profiles.js";

src/agents/model-runtime-aliases.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* Resolves CLI runtime aliases to provider/model auth labels and execution ids.
3+
*/
14
import { normalizeProviderId } from "@openclaw/model-catalog-core/provider-id";
25
import { normalizeOptionalLowercaseString } from "@openclaw/normalization-core/string-coerce";
36
import type { OpenClawConfig } from "../config/types.openclaw.js";

0 commit comments

Comments
 (0)