fix: agent-readiness — Bearer auth on renter balance/me + doc-accuracy#631
Open
dhnpmp-tech wants to merge 1 commit into
Open
fix: agent-readiness — Bearer auth on renter balance/me + doc-accuracy#631dhnpmp-tech wants to merge 1 commit into
dhnpmp-tech wants to merge 1 commit into
Conversation
…cy fixes Makes the DCP renter API consistent for agents that authenticate with Authorization: Bearer (the form MCP/OpenAI-SDK agents use). - backend: GET /api/renters/balance and GET /api/renters/me now also accept Authorization: Bearer <key> (via getBearerToken), matching /v1/* and /api/pods. Previously a Bearer-only request got "API key required" while inference + pods worked, even though llms.txt advertises balance over Bearer. Improved the 400 message to list all three accepted auth forms. - docs(llms.txt): correct the MCP tool list — it listed a non-existent `list_pods` and omitted `get_pod`/`get_volume`. Now matches the 9 tools the server actually exposes. - docs(openapi.yaml + public copy): renter key prefix is `dc1-sk-`, not `dc1-renter-`; document Bearer as an accepted auth form.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
What
Agent-readiness pass for the agent-first MCP story. Fixes the auth inconsistency and doc inaccuracies that would trip a fully-autonomous agent, without touching
feat/burst-bridge.Backend (quick, safe)
GET /api/renters/balanceandGET /api/renters/menow acceptAuthorization: Bearer <key>(via the existinggetBearerTokenhelper), matching/v1/*and/api/pods. Previously a Bearer-only agent got{"error":"API key required"}on balance/me while inference + pods worked — andllms.txtalready advertises balance over Bearer, so the docs were ahead of the code.x-renter-key/?key=).Docs accuracy
public/llms.txt: the MCP tool list named a non-existentlist_podsand omittedget_pod/get_volume. Now matches the 9 tools the server actually exposes (list_models, chat, get_balance, create_pod, get_pod, extend_pod, stop_pod, rent_volume, get_volume).docs/openapi.yaml+public/docs/openapi.yaml: renter key prefix isdc1-sk-(notdc1-renter-); documented Bearer as an accepted auth form.Why
The MCP server only works on balance today because
integrations/dcp-mcp/index.jssends BOTHAuthorization: BearerANDx-renter-key(belt+braces). A pure-Bearer agent (any OpenAI-SDK-style client) would fail balance/me. This closes that gap.Test plan
node --check backend/src/routes/renters.jsyaml.safe_load)curl -H "Authorization: Bearer dc1-sk-..." https://api.dcp.sa/api/renters/balance->{"error":"API key required"}Not in scope (flagged for owner)
@dcp/mcpis not published to npm (404) and no npm creds on this machine — owner mustnpm publish --access public. Homepage/docs tell agents tonpx -y @dcp/mcp, which fails until then.create_podhas nogpu_type/provider_idselector (bug feat(volt): Billing Engine — SAR Metering, Wallet, Moyasar Integration #3) — agents can only get an auto-picked native GPU, not the advertised burst types. Needs an MCP + backend change.🤖 Generated with Claude Code