Skip to content

fix(search): support Exa and Brave keys from auth.yaml - #2234

Merged
jbeda merged 4 commits into
mainfrom
issue-2202-exa-auth-file
Oct 9, 2026
Merged

jbeda merged 4 commits into
mainfrom
issue-2202-exa-auth-file

Conversation

@jbeda

@jbeda jbeda commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Support providers.exa.api_key and providers.brave.api_key in auth.yaml; EXA_API_KEY and BRAVE_API_KEY retain precedence.
  • Use the shared credential lifecycle for standalone mecated and embedded mecatui, including credential_store.api_key.file.
  • Preserve WebSearch selection order: SearXNG, Brave, then Exa; with neither backend selected, Exa remains anonymous unless configured.
  • Report Exa mode without exposing credentials or secret-bearing request URLs, and document both search credentials.
  • Defer SEARXNG_URL support in settings.yaml to Configure SearXNG endpoint in operator settings #2235.

Verification

  • go test ./internal/cliconfig ./internal/app ./cmd/mecated ./cmd/mecatui
  • cd engine && go test ./adapter/search
  • task docs
  • task test
  • git diff --check

Closes #2202

@jbeda

jbeda commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

Implementation plan

Contract

  • Resolve Exa credentials through the existing API-key file lifecycle: EXA_API_KEY overrides providers.exa.api_key.
  • Exa remains a search credential and does not satisfy model-provider availability checks.
  • Preserve search backend precedence and anonymous Exa when no key is configured.
  • Reuse existing credential-store handling; do not introduce a separate credential file or resolver.
  • Expose only non-secret Exa diagnostics: selected backend and anonymous/authenticated mode. Never log credentials or request URLs containing them.

Work

  1. Add Exa to the shared credential snapshot, auth-file allowlist, and existing provider credential loader.
  2. Remove standalone Exa environment wiring and project the loader result into both standalone and embedded app configuration.
  3. Correct Exa mode diagnostics and prevent backend error paths from returning secret-bearing request URLs.
  4. Add offline tests for file loading, environment precedence, anonymous fallback, credential-store composition, standalone and embedded construction, request behavior, and secret-safe diagnostics/errors.
  5. Document Exa configuration in the web-search and provider credential guides.

Validation

Run focused credential, app, command, and Exa adapter tests; documentation checks; then the offline repository test suite. No live Exa calls.

@jbeda

jbeda commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

Plan revision: Brave and SearXNG follow-up

The implementation plan now covers Brave alongside Exa:

  • BRAVE_API_KEY overrides providers.brave.api_key, using the same existing auth.yaml and credential-store lifecycle as Exa.
  • Brave remains a search credential rather than an LLM-provider credential.
  • Both standalone and embedded compositions use the shared snapshot; search priority remains SearXNG, Brave, then Exa.
  • Coverage includes file/env precedence, credential-store selection, standalone and embedded construction, and safe diagnostics.

SEARXNG_URL configuration in operator settings.yaml is intentionally deferred to #2235.

@jbeda jbeda changed the title fix(search): support Exa keys from auth.yaml fix(search): support Exa and Brave keys from auth.yaml Oct 9, 2026
@jbeda
jbeda merged commit 8c86c07 into main Oct 9, 2026
39 checks passed
@jbeda
jbeda deleted the issue-2202-exa-auth-file branch October 9, 2026 21:29
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Oct 13, 2026
2 tasks

This branch was successfully deployed

1 active deployment
Preview — ac47486b Deployed Oct 9, 2026 by vercel[bot]
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.

Support Exa keys in auth.yaml and fix embedded mecatui credential wiring

1 participant