Skip to content

fix: v1Auth surplus inference endpoint for Luca on Hermes Telegram runtime#168

Merged
danbuildss merged 1 commit into
mainfrom
claude/luca-aeon-skills-caYGZ
Jun 29, 2026
Merged

fix: v1Auth surplus inference endpoint for Luca on Hermes Telegram runtime#168
danbuildss merged 1 commit into
mainfrom
claude/luca-aeon-skills-caYGZ

Conversation

@danbuildss

Copy link
Copy Markdown
Owner

Root cause

The previous inference endpoint (/api/inference/v1/chat/completions) used internalAuth — it requires ZETTA_INTERNAL_SECRET. Luca on Hermes uses a v1 API key for all skill calls, not the internal secret. Auth mismatch = 401 on every call from Telegram runtime.

Fix

New POST /api/v1/luca/inference — same auth as every other Luca skill (Authorization: Bearer <api-key>). No new env vars needed on Hermes.

  • OpenAI-compatible body: { model, messages, stream? }
  • SURPLUS_API_KEY stays on Vercel, never sent from Hermes
  • Spend logged automatically to inference_events + agent_economic_events
  • Skills catalog updated to point to the correct endpoint with correct auth docs

Test from your Mac (verify Vercel is working before telling Luca)

curl -X POST https://www.zettaai.co/api/v1/luca/inference \
  -H "Authorization: Bearer <LUCA_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{"model":"llama-3.3-70b","messages":[{"role":"user","content":"reply with one word: working"}]}'

Should return an OpenAI-compatible response. Check inference_events in Supabase — a row with provider=surplus, agent_id=luca should appear.

What to tell Luca on Hermes

"New endpoint for Surplus inference: POST https://www.zettaai.co/api/v1/luca/inference — use your existing API key (same one you use for agent-read, agent-books, etc.). Body: { model, messages }. No other changes needed."


Generated by Claude Code

Previous path used internalAuth (ZETTA_INTERNAL_SECRET) — Hermes only has
a v1 API key, causing 401 on every call from Telegram runtime.

New POST /api/v1/luca/inference uses v1Auth (same Bearer key as all other
Luca skills). Same OpenAI-compatible body, same spend logging, no new env
vars needed on Hermes. Skills catalog updated to point to correct endpoint.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RjpGP3kYKnQuQAUoK6RZky
@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
zetta Ready Ready Preview, Comment Jun 29, 2026 10:30pm

@danbuildss danbuildss merged commit dfe0290 into main Jun 29, 2026
3 checks passed
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.

2 participants