Conversation
…issues #3300 and #3299 ## orchestrator_provider (#3300) Implements the ParaManager pattern from arXiv:2604.17009: a cheap small model can serve as orchestrator, reducing cost without sacrificing task quality. - Add `orchestrator_provider: ProviderName` to `OrchestrationConfig` - Wire through `OrchestrationState` and `AgentBuilder` - Fallback chain in `plan.rs`: verify_provider → orchestrator_provider → primary; aggregator and predicate follow the same chain - Update `scheduler_loop.rs` predicate resolution (M4 fix) - Migration step 43 (`migrate_orchestration_orchestrator_provider`) ## AdmissionGate (#3299) Implements HiveMind OS-inspired scheduling primitives from arXiv:2604.17111: admission control prevents provider overcommit; per-task budget is warn-only (hard enforcement deferred until per-task CostTracker scoping is available). - Add `max_concurrent: Option<u32>` to `ProviderEntry` - New `crates/zeph-orchestration/src/admission.rs`: `AdmissionGate` wrapping per-provider semaphores, keyed by provider name - `DagScheduler` acquires permit before Spawn via `agent_provider_map` (agent-def-name → provider-name); defers on capacity using existing backoff - `record_spawn_failure` cleans up `pending_permits` to prevent semaphore leak - Warn-only budget check on task completion; reuses `CostTracker` - Migration step 44 (`migrate_provider_max_concurrent`) Closes #3300, #3299
77921a2 to
0739ad4
Compare
3 tasks
…arg signature DagScheduler::new gained an admission_gate: Option<AdmissionGate> parameter in the AdmissionGate implementation. The orchestration_integration tests were not updated alongside the scheduler internals.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
orchestrator_providerconfig field so a cheap/fast provider (e.g.gpt-4o-mini) can serve as the orchestration decision-maker, reducing cost without sacrificing task quality.AdmissionGatewith per-provider semaphores prevents provider overcommit under concurrent subagent workloads; per-task token budget is warn-only in this MVP.Changes
#3300 — orchestrator_provider
OrchestrationConfig.orchestrator_provider: ProviderName(zeph-config)OrchestrationState,AgentBuilder, bootstrap (runner/daemon/acp)orchestrator_provider→ primary; applies to verifier, predicate, and aggregatormigrate_orchestration_orchestrator_provider)#3299 — AdmissionGate
ProviderEntry.max_concurrent: Option<u32>—None= unlimited (default)crates/zeph-orchestration/src/admission.rs:AdmissionGatekeyed by provider nameDagScheduleracquires permit before Spawn viaagent_provider_map; defers on capacity using existingdeferral_backoffrecord_spawn_failure(prevents semaphore slot leak)CostTrackermigrate_provider_max_concurrent)Config Example
Test Plan
cargo nextest run --workspace --lib --bins— 8876 tests passcargo clippy --workspace -- -D warnings— cleancargo +nightly fmt --check— cleanorchestrator_provider = "fast"— verify orchestration uses fast provider, no 400/422 errorsCloses #3300, #3299