fix: v1Auth surplus inference endpoint for Luca on Hermes Telegram runtime#168
Merged
Conversation
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
|
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.
Root cause
The previous inference endpoint (
/api/inference/v1/chat/completions) usedinternalAuth— it requiresZETTA_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.{ model, messages, stream? }SURPLUS_API_KEYstays on Vercel, never sent from Hermesinference_events+agent_economic_eventsTest from your Mac (verify Vercel is working before telling Luca)
Should return an OpenAI-compatible response. Check
inference_eventsin Supabase — a row withprovider=surplus, agent_id=lucashould appear.What to tell Luca on Hermes
Generated by Claude Code