feat(agent): add Maple (OpenSecret) provider - #6607
Open
benthecarman wants to merge 4 commits into
Open
Conversation
Model discovery lived in per-provider arms: the agent's session/new response listed live models only for Databricks, and each frontend carried its own per-provider discovery code. A new provider meant a new special case in every frontend. Move the dispatch into the agent, which owns every provider transport. catalog::discover_models is the one dispatch point. The session/new availableModels block consumes it generically, and a new "buzz-agent models" subcommand exposes it to frontends as a JSON array. The subcommand runs before a model is chosen, so provider connection resolution splits out of Config::from_env into a path that does not require a model. Providers without an agent-side catalog report an empty list so callers fall back to the configured model. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: benthecarman <benthecarman@live.com>
The desktop's model picker listed live models only for providers with desktop-side HTTP discovery; anything else fell through to the ACP subprocess, which requires a configured model and therefore fails for draft configs in the create/edit dialog with "config: <PROVIDER>_MODEL required", shown as "Could not load live models". Run "buzz-agent models" before the ACP fallback when the runtime is buzz-agent. The agent owns every provider transport and needs no configured model, so a provider added to the agent now loads models in the dialog with no desktop changes. Missing API keys match a generic "config: <KEY>_API_KEY required" pattern instead of per-provider copy. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: benthecarman <benthecarman@live.com>
Add Maple (OpenSecret) as a provider in buzz-agent, selected with BUZZ_AGENT_PROVIDER=maple and configured through MAPLE_API_KEY, MAPLE_MODEL, MAPLE_BASE_URL, and MAPLE_PCR0_ENVIRONMENT. Requests travel through the opensecret SDK instead of a plain HTTPS POST: the SDK verifies the enclave's AWS Nitro attestation document against pinned PCR0 trust roots, performs the key exchange, and end-to-end encrypts request and response bodies. Inside the envelope the wire format is OpenAI Chat Completions, so the existing body builder and parser are reused unchanged. Retries follow post() (retryable statuses, escalating timeout budgets, malformed-body retries) with two deliberate differences: auth rejections fail immediately because a static key cannot mint a different token, and an attestation verification failure is terminal with an explicit "request not sent" message. That guarantee is the reason to use this provider. Model discovery plugs into the provider-generic dispatch and lists the enclave's catalog through the same attested transport; audio, TTS, and embedding models are filtered out. The enclave lists models for any attested session without a credential, so discovery accepts an empty key and builds an attested-but-unauthenticated client. The model picker can fill in before the user enters a key; inference still requires one. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: benthecarman <benthecarman@live.com>
Show the buzz-agent Maple provider in the desktop app: the persona provider picker gains a "Maple (encrypted)" entry with a Maple API Key credential field, and the readiness mirror requires MAPLE_API_KEY plus a model, accepting MAPLE_MODEL as the provider-specific fallback. No model-discovery code is added here. The picker loads Maple's catalog through the provider-generic "buzz-agent models" path. The buzz-agent per-provider readiness tests (OpenRouter, Maple) move to a sibling file, following the goose file-config convention, so readiness.rs stays under the desktop file-size limit. A Playwright screenshot spec covers the picker entry and the credential field. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: benthecarman <benthecarman@live.com>
Contributor
Author
Maple in the provider pickerThe persona provider picker lists "Maple (encrypted)" alongside the existing providers. Maple selectedSelecting Maple swaps the credential field to a Maple API Key input. The model picker loads through the provider-generic |
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
Adds Maple (OpenSecret) as a buzz-agent inference provider, and makes
model discovery provider-generic so the desktop picks up new providers
with no desktop-side discovery code.
catalog::discover_modelsis the one dispatch point behind both ACPsession/newavailableModelsand a newbuzz-agent modelssubcommand. Frontends stop carrying per-provider discovery knowledge; a provider added to the agent reaches every picker automatically. The subcommand builds its config without requiring a model, via a split of provider connection resolution out ofConfig::from_env.buzz-agent modelsbefore the ACP fallback when the runtime is buzz-agent. It needs no configured model, so draft configs in the create/edit dialog get live models too. Missing keys render through a genericconfig: <KEY>_API_KEY requiredmatcher instead of per-provider copy.post()with two deliberate differences: auth rejections fail immediately (a static key cannot mint a different token), and an attestation verification failure is terminal with an explicit "request not sent" message.MAPLE_API_KEYplus a model, withMAPLE_MODELas the provider-specific fallback.Keyless discovery: the Maple enclave lists models for any attested
session, so a model picker can fill in before the user has entered a
key. Inference still requires the key.
Configuration:
BUZZ_AGENT_PROVIDER=maple,MAPLE_API_KEY,MAPLE_MODEL,MAPLE_BASE_URL(defaulthttps://enclave.trymaple.ai),MAPLE_PCR0_ENVIRONMENT(
production|development, which PCR0 trust roots verify theattestation).
Related issue
None found.
Testing
just cipasses locally (fmt, clippy, unit + integration tests, desktop/web/mobile builds and tests).MAPLE_MODELfallback;buzz-agent modelsstdout parsing; frontend tests for the generic missing-key matcher.maple-provider-uiscreenshot spec covers the picker entry and the credential field. Screenshots posted in the comments below.