Commit Graph

8 Commits

Author SHA1 Message Date
Developer
da8c925e8e feat(config): add centralized API endpoint configuration
Add src/config/api-endpoints.ts with ENV variable support for all external API base URLs.
This enables routing traffic through a proxy for multi-tenant deployments, usage metering, and security filtering.

Supported ENV variables:
- TELEGRAM_API_BASE (default: https://api.telegram.org)
- DISCORD_API_BASE (default: https://discord.com/api/v10)
- OPENAI_API_BASE (default: https://api.openai.com/v1)
- ANTHROPIC_API_BASE (default: https://api.anthropic.com)
- GOOGLE_GENERATIVE_API_BASE (default: https://generativelanguage.googleapis.com/v1beta)
- GROQ_API_BASE (default: https://api.groq.com/openai/v1)
- DEEPGRAM_API_BASE (default: https://api.deepgram.com/v1)
- ELEVENLABS_API_BASE (default: https://api.elevenlabs.io)
- OPENAI_TTS_BASE_URL (default: same as OPENAI_API_BASE)

Updated files to use centralized configuration:
- telegram/audit.ts, probe.ts, download.ts, bot/delivery.ts
- channels/plugins/onboarding/telegram.ts
- discord/api.ts, probe.ts
- tts/tts.ts
- memory/embeddings-openai.ts, embeddings-gemini.ts
- media-understanding/providers/openai/audio.ts
- media-understanding/providers/google/audio.ts, video.ts
- media-understanding/providers/deepgram/audio.ts
- media-understanding/providers/groq/index.ts

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 06:43:27 +01:00
wolfred
241436a525 fix: handle fetch/API errors in telegram delivery to prevent gateway crashes
Wrap all bot.api.sendXxx() media calls in delivery.ts with error handler
that logs failures before re-throwing. This ensures network failures are
properly logged with context instead of causing unhandled promise rejections
that crash the gateway.

Also wrap the fetch() call in telegram onboarding with try/catch to
gracefully handle network errors during username lookup.

Fixes #2487

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 20:04:05 -06:00
Peter Steinberger
6d5195c890 refactor: normalize cli command hints 2026-01-20 07:43:00 +00:00
Peter Steinberger
d9384785a3 fix: stabilize ci checks 2026-01-19 00:34:26 +00:00
Peter Steinberger
ace8a1b44e feat: expand dm allowlist onboarding 2026-01-18 22:52:00 +00:00
Peter Steinberger
624cb33534 feat: expand Telegram allowFrom guidance
Co-authored-by: Christoph Nakazawa <cpojer@users.noreply.github.com>
2026-01-15 06:15:06 +00:00
Peter Steinberger
c379191f80 chore: migrate to oxlint and oxfmt
Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
2026-01-14 15:02:19 +00:00
Peter Steinberger
90342a4f3a refactor!: rename chat providers to channels 2026-01-13 08:40:39 +00:00