Skip to content

feat(core+wizard): build_gonka_provider, AnyProvider::Gonka, native wizard branch with inferenced integration #3613

@bug-ops

Description

@bug-ops

Part of epic #3602.

Scope

Wire GonkaProvider end-to-end so users can declare a native gonka provider in their config and select it via the wizard. This is the user-visible Phase 2 release gate.

Files to modify

  • crates/zeph-llm/src/any.rs — add Gonka(GonkaProvider) variant; extend delegate_provider! macro arms; update provider_kind_str, with_generation_overrides, set_status_tx, list_models_remote.
  • crates/zeph-core/src/provider_factory.rs — new build_gonka_provider(entry, config):
    • Read ZEPH_GONKA_PRIVATE_KEY from config.secrets.gonka_private_key (error if missing).
    • Read optional ZEPH_GONKA_ADDRESS; derive from the private key if absent (log INFO when derived).
    • If both present and disagree, fail with BootstrapError::Provider(\"ZEPH_GONKA_ADDRESS does not match address derived from private key\").
    • Read gonka_nodes from entry; error if empty.
    • Construct EndpointPool, RequestSigner, OpenAiProvider (inner), GonkaProvider.
    • Route ProviderKind::Gonka in build_provider_from_entry.
  • src/init/llm.rs — add menu item 6 \"Gonka (native — requires GNK staking)\":
    1. Auto-detect inferenced on PATH; print release URL when missing.
    2. List or create accounts via inferenced keys list/add.
    3. Export private key (--unarmored-hex --unsafe) and address.
    4. Seed three default nodes; prompt for each provider address.
    5. Model picker.
    6. Self-test: sign a probe payload to surface bad hex immediately.
    7. Refuse non-age vault; never echo the private key.
  • src/init/mod.rs — new WizardState fields gonka_private_key, gonka_address, gonka_nodes.
  • src/commands/migrate.rs — translate older compatible entries pointing at gonka.ai into type = \"gonka\".

Files to create

  • .local/testing/playbooks/gonka-native.md — three scenarios (happy path, missing inferenced, wrong vault backend).
  • .local/testing/coverage-status.md — new row Gonka native provider.

Acceptance

  • Live testnet round-trip answers a chat prompt.
  • cargo nextest run --workspace --features full --lib --bins green.
  • cargo +nightly fmt --check, cargo clippy --workspace --features full -- -D warnings green.
  • Snapshot of rendered config block included via insta.
  • CHANGELOG.md [Unreleased] updated.

Depends on

#3608, #3609, #3611, #3612.

Size

M (~6h)

Metadata

Metadata

Assignees

Labels

P1High ROI, low complexity — do next sprintconfigConfiguration file changesenhancementNew feature or requestfeatureNew functionalitysize/MMedium PR (51-200 lines)uxUser experience

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions