feat(clients): integrate plan 18: API catalog for 83 Google services, key table, detail error envelope, docs

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-25 16:01:51 +01:00
co-authored by Claude Sonnet 5.5
parent 78426d1ba5
commit 997b06bc60
10 changed files with 416 additions and 30 deletions
+17
View File
@@ -83,3 +83,20 @@ fetches, so open it by hand.
Anthropic's old host `console.anthropic.com` redirects to `platform.claude.com`.
Google's keys and the APIs to enable live in `src/google/APIS.md`.
Packages added by plan 18 (`src/vendors/<v>/`). Key page status as in the table
above; where a package covers many providers, its own SPEC holds the full
table (provider, env var, page).
| Package | Env var(s) | Page |
|---|---|---|
| Cohere | `COHERE_API_KEY` | https://dashboard.cohere.com/api-keys (docs) |
| Mistral | `MISTRAL_API_KEY` | package SPEC section 9 |
| Perplexity | `PERPLEXITY_API_KEY` | https://console.perplexity.ai/ (unverified path) |
| Amazon Bedrock | `AWS_BEARER_TOKEN_BEDROCK`, or `AWS_ACCESS_KEY_ID` + `AWS_SECRET_ACCESS_KEY` (+ `AWS_SESSION_TOKEN`), `AWS_REGION` | https://console.aws.amazon.com/iam/home#/security_credentials (unverified) |
| Azure OpenAI / Foundry | `AZURE_OPENAI_ENDPOINT`, `AZURE_OPENAI_API_KEY`, `AZURE_OPENAI_API_VERSION`; Entra: `AZURE_TENANT_ID`, `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET`; optional `AZURE_AI_ENDPOINT`, `AZURE_CONTENT_SAFETY_ENDPOINT`, `AZURE_CONTENT_SAFETY_KEY`, `AZURE_AUTHORITY_HOST` | Azure portal, package SPEC section 12 |
| Hugging Face | `HF_TOKEN` | https://huggingface.co/settings/tokens (docs) |
| Audio | `ELEVENLABS_API_KEY`, `ASSEMBLYAI_API_KEY`, `DEEPGRAM_API_KEY`, `CARTESIA_API_KEY`, `SPEECHMATICS_API_KEY`, `SPEECHMATICS_MANAGEMENT_TOKEN`, `HUME_API_KEY` | package SPEC section on credentials |
| Media | `STABILITY_API_KEY`, `BFL_API_KEY`, `RUNWAY_API_KEY` (or `RUNWAYML_API_SECRET`), `LUMA_API_KEY`, `REPLICATE_API_TOKEN`, `FAL_KEY`, `IDEOGRAM_API_KEY`, `RECRAFT_API_TOKEN`, `LEONARDO_API_KEY`, `MINIMAX_API_KEY`, `KLING_ACCESS_KEY` + `KLING_SECRET_KEY`, `HF_API_KEY_ID` + `HF_API_KEY_SECRET` (Higgsfield) | package SPEC section on credentials |
| Retrieval | `VOYAGE_API_KEY`, `JINA_API_KEY`, `PINECONE_API_KEY`, `QDRANT_API_KEY` + `QDRANT_URL`, `WEAVIATE_API_KEY` + `WEAVIATE_URL`, `MXBAI_API_KEY`, `TAVILY_API_KEY`, `EXA_API_KEY`, `BRAVE_API_KEY` | package SPEC |
| Compat (39 providers) | one env var per row, e.g. `GROQ_API_KEY`, `NEBIUS_API_KEY`, `UPSTAGE_API_KEY` | `src/vendors/compat/SPEC.md` section 4 |
+10
View File
@@ -56,6 +56,16 @@ ApiError error_from_response(const std::string& vendor,
message = err->as_string();
} else if (doc.is_object()) {
std::string m = text_of(doc.find("message"));
// FastAPI-style envelope: {"detail":"text"} or {"detail":[{"msg":"text"}]}.
if (m.empty()) {
const Json* d = doc.find("detail");
if (d && d->is_array() && !d->as_array().empty()) {
const Json& first = d->as_array().front();
m = first.is_object() ? text_of(first.find("msg")) : text_of(&first);
} else {
m = text_of(d);
}
}
if (!m.empty()) message = m;
std::string t = text_of(doc.find("type"));
if (t.empty()) t = text_of(doc.find("code"));