LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Agent
  • Middleware
  • Backends
  • Sandboxes
  • Skills
  • Subagents
  • Types
Modal
Daytona
Deno
Node VFS
Sandbox Standard Tests
  • Vitest
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewAgentMiddlewareBackendsSandboxesSkillsSubagentsTypes
Modal
Daytona
Deno
Node VFS
Sandbox Standard Tests
Vitest
Language
Theme
JavaScriptdeepagentsindexgetHarnessProfile
Function●Since v1.10

getHarnessProfile

Look up the HarnessProfile for a model spec string.

Resolution order:

  1. Exact match on spec (e.g., "openai:gpt-5.4").
  2. Provider prefix (everything before :) when spec contains a colon and both halves are non-empty.
  3. When both exist, they are merged (provider as base, exact as override).
  4. undefined when nothing matches.

Malformed specs (empty, multiple colons, empty halves) return undefined without consulting the registry.

Copy
getHarnessProfile(spec: string): HarnessProfile | undefined

Parameters

NameTypeDescription
spec*string

Model spec in "provider:model" format, or a bare provider/model identifier.

View source on GitHub