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)\":
- Auto-detect
inferenced on PATH; print release URL when missing.
- List or create accounts via
inferenced keys list/add.
- Export private key (
--unarmored-hex --unsafe) and address.
- Seed three default nodes; prompt for each provider address.
- Model picker.
- Self-test: sign a probe payload to surface bad hex immediately.
- 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)
Part of epic #3602.
Scope
Wire
GonkaProviderend-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— addGonka(GonkaProvider)variant; extenddelegate_provider!macro arms; updateprovider_kind_str,with_generation_overrides,set_status_tx,list_models_remote.crates/zeph-core/src/provider_factory.rs— newbuild_gonka_provider(entry, config):ZEPH_GONKA_PRIVATE_KEYfromconfig.secrets.gonka_private_key(error if missing).ZEPH_GONKA_ADDRESS; derive from the private key if absent (log INFO when derived).BootstrapError::Provider(\"ZEPH_GONKA_ADDRESS does not match address derived from private key\").gonka_nodesfrom entry; error if empty.EndpointPool,RequestSigner,OpenAiProvider(inner),GonkaProvider.ProviderKind::Gonkainbuild_provider_from_entry.src/init/llm.rs— add menu item 6\"Gonka (native — requires GNK staking)\":inferencedon PATH; print release URL when missing.inferenced keys list/add.--unarmored-hex --unsafe) and address.src/init/mod.rs— newWizardStatefieldsgonka_private_key,gonka_address,gonka_nodes.src/commands/migrate.rs— translate older compatible entries pointing atgonka.aiintotype = \"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 rowGonka native provider.Acceptance
cargo nextest run --workspace --features full --lib --binsgreen.cargo +nightly fmt --check,cargo clippy --workspace --features full -- -D warningsgreen.insta.CHANGELOG.md[Unreleased]updated.Depends on
#3608, #3609, #3611, #3612.
Size
M (~6h)