pub struct OpenHarnessConfig {
pub id: String,
pub display_name: String,
pub base_url: String,
pub prompt_cache: PromptCache,
pub api_key: ApiKey,
pub disabled_tools: Vec<String>,
pub instruction_sources: InstructionSources,
pub global_skill_roots: Vec<PathBuf>,
pub profile: PromptProfile,
pub models: Vec<ModelChoice>,
}Expand description
Configuration for OpenHarness::custom — named fields rather than a long
positional argument list, so a call site reads unambiguously (which string is
the id vs the display name). Derives Default, so optional fields can be
omitted with ..Default::default().
Fields§
§id: StringStable id used in the registry / picker (e.g. "openrouter").
display_name: StringHuman-readable name shown in the UI (e.g. "OpenRouter").
base_url: StringBase URL with no trailing slash; chat is {base}/v1/chat/completions.
prompt_cache: PromptCacheWhether requests mark the prompt prefix as cacheable. See
PromptCache — needed for Anthropic models reached through a gateway,
unnecessary elsewhere.
api_key: ApiKeyWhere this endpoint’s key comes from, or that it needs none. See
ApiKey: one value, so “needs a key” and “reads this variable”
cannot disagree the way three separate fields could.
disabled_tools: Vec<String>Tool ids to withhold from this agent. Every tool is offered by default; name the ones this host does not want.
A denylist is right here and wrong for environment variables, for the
same reason in reverse: tool ids are a closed set this crate owns, so
naming one cannot miss a case, while environment names are open-ended
and a name-shaped guess always will. See
OpenHarness::builtin_tool_names for the set.
Withheld at construction, so a disabled tool never reaches the model —
it costs no schema in the request and cannot be attempted. That is
different from PermissionRule::deny, which advertises the tool and
refuses the call.
instruction_sources: InstructionSourcesWhere AGENTS.md / CLAUDE.md are read from, and how much of them is
kept. Defaults to the working tree only — nothing under $HOME is read
until a host asks, via InstructionSources::discover_global or its
own paths.
global_skill_roots: Vec<PathBuf>Per-user skill directories scanned in addition to the project’s. Empty
by default; global_skill_roots returns the usual ones
for a host that wants them.
profile: PromptProfileWhich prompt and tool surface runs get. PromptProfile::Auto (the
default) picks PromptProfile::Compact for a small context window —
core tools and plainer instructions, so a small local model has room to
work in.
models: Vec<ModelChoice>Curated models for the picker; may be empty (free-text ids are allowed,
or call OpenHarness::with_models_dev for catalog discovery).
Trait Implementations§
Source§impl Clone for OpenHarnessConfig
impl Clone for OpenHarnessConfig
Source§fn clone(&self) -> OpenHarnessConfig
fn clone(&self) -> OpenHarnessConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more