mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 05:37:20 +08:00
refactor: remove obsolete verified model fallback module
Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user