mirror of
https://github.com/openai/codex.git
synced 2026-10-21 17:48:44 +00:00
## What changed - Add `[skills].max_context_tokens` to override the token budget used to render the available-skills catalog. - Require a positive value and cap configured budgets at 10,000 tokens. - Preserve the existing default of 2% of the model context window when the option is unset. ## Testing - Cover configuration parsing, override behavior, the 10,000-token cap, and catalog rendering within the configured budget. GitOrigin-RevId: f29ddcb57fc2d800c0006d03e1c33cbe3ab6272d
17 lines
742 B
Rust
17 lines
742 B
Rust
use std::num::NonZeroUsize;
|
|
|
|
/// Host-supplied configuration used by the skills extension.
|
|
#[derive(Clone, Debug, Eq, PartialEq)]
|
|
pub struct SkillsExtensionConfig {
|
|
/// Whether the available-skills catalog is included in model context.
|
|
pub include_instructions: bool,
|
|
/// Optional token budget override for the available-skills catalog.
|
|
pub max_context_tokens: Option<NonZeroUsize>,
|
|
/// Whether bundled skills are eligible for discovery.
|
|
pub bundled_skills_enabled: bool,
|
|
/// Whether orchestrator-owned skills are eligible for discovery.
|
|
pub orchestrator_skills_enabled: bool,
|
|
/// Whether cheap skill selectors run in shadow mode without changing prompt contents.
|
|
pub shadow_selection_enabled: bool,
|
|
}
|