refactor: remove obsolete verified model fallback module

Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
openhands
2026-03-19 11:40:14 +00:00
parent 9883f5f9f0
commit 94c936b68e
3 changed files with 4 additions and 13 deletions

View File

@@ -28,10 +28,11 @@ import { LlmSettingsInputsSkeleton } from "#/components/features/settings/llm-se
import { KeyStatusIcon } from "#/components/features/settings/key-status-icon";
import { DEFAULT_SETTINGS } from "#/services/settings";
import { getProviderId } from "#/utils/map-provider";
import { DEFAULT_OPENHANDS_MODEL } from "#/utils/verified-models";
import { useMe } from "#/hooks/query/use-me";
import { usePermission } from "#/hooks/organizations/use-permissions";
const DEFAULT_OPENHANDS_MODEL = "openhands/claude-opus-4-5-20251101";
interface OpenHandsApiKeyHelpProps {
testId: string;
}

View File

@@ -1,10 +0,0 @@
// ---------------------------------------------------------------------------
// All verified-model and verified-provider lists are now served by the
// backend via ``GET /api/options/models`` (see ``ModelsResponse``).
//
// This file only keeps the compile-time fallback default used when no API
// response is available yet (e.g. the initial settings page render).
// ---------------------------------------------------------------------------
/** Fallback default model shown before the API responds. */
export const DEFAULT_OPENHANDS_MODEL = "openhands/claude-opus-4-5-20251101";

View File

@@ -176,8 +176,8 @@ def _assign_provider(model: str) -> str:
if '/' in model or '.' in model:
return model
# Build the openhands bare-name set dynamically so it always matches
# whatever ``get_openhands_models`` returns at call time.
# Prefix well-known bare SDK model names with their canonical provider.
# The provider sets are loaded from the SDK once at import time.
if model in _BARE_OPENAI_MODELS:
return f'openai/{model}'
if model in _BARE_ANTHROPIC_MODELS: