Skip to content

Add configurable provider instances - #190

Open
batkiz wants to merge 3 commits into
egoist:mainfrom
batkiz:codex/provider-instances
Open

batkiz wants to merge 3 commits into
egoist:mainfrom
batkiz:codex/provider-instances

Conversation

@batkiz

@batkiz batkiz commented Aug 27, 2026

Copy link
Copy Markdown

Summary

This PR introduces configurable provider instances, allowing the same coding-agent provider to be added multiple times with different launch configurations.

Each instance has:

  • a stable identity
  • a custom display name
  • an enabled state
  • an optional binary override
  • per-instance environment variables

For example, multiple Codex instances can use different CODEX_HOME values, allowing separate accounts and configurations to coexist without changing Waku's process-wide environment.

Motivation

Some coding agents use environment variables to select their configuration or account. Codex, for example, resolves configuration, authentication, sessions, and skills through CODEX_HOME.

Previously, Waku modeled each coding agent as a single global provider. Supporting multiple configurations would therefore require switching the environment outside Waku or duplicating provider-specific logic.

Provider instances keep the existing ProviderKind responsible for driver behavior and capabilities, while making launch configuration instance-specific. This also makes the feature usable by providers other than Codex.

Changes

  • Add a persisted ProviderInstance configuration with a stable ID, custom name, provider kind, enabled state, binary override, and environment.
  • Preserve the existing built-in providers and legacy settings format.
  • Add native and web settings UI for creating, naming, configuring, enabling, disabling, and removing custom instances.
  • Carry the provider instance identity through sessions, model selection, favorites, persistence, probes, catalogs, usage data, and provider process pools.
  • Apply the selected instance environment to provider discovery and launch paths.
  • Isolate provider-sensitive caches and long-running processes by instance.
  • Resolve Codex-specific paths such as sessions, authentication, skills, and usage from the selected instance environment.
  • Update protocol bindings and translations.

Backward compatibility

Existing settings and sessions continue to use the built-in provider instance whose ID matches the provider ID.

The existing disabled_providers and provider_binary_overrides settings remain supported, so no configuration migration is required.

Custom instances cannot shadow built-in IDs, and legacy sessions without an explicit provider instance ID fall back to their original provider.

Testing

  • cargo test --lib
    • 342 application tests passed
    • 59 protocol tests passed
    • 24 environment-dependent tests ignored
  • cargo check --bin waku
  • bun test apps/web/src
    • 130 tests passed
  • bun run --cwd apps/web typecheck
  • cargo run -p waku-protocol --bin export_types -- --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant