Fix admin restart, optimize daily digest, and add Atlas Cloud support#604
Merged
Conversation
The -n (non-interactive) flag caused sudo to fail silently when the mu user didn't have NOPASSWD in sudoers. Removed the flag so it at least attempts properly. The server needs a sudoers entry like: mu ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart mu
The digest scheduler was re-generating the entire content every time it checked (every few hours), burning a full Sonnet call to overwrite the same day's post. Now if today's digest already exists, it logs and skips. One generation per day, that's it.
Atlas Cloud (atlascloud.ai) provides OpenAI-compatible inference at significantly lower cost than Anthropic: DeepSeek V4 Pro: $1.68/$3.38/M tokens (vs Sonnet $3/$15) DeepSeek V4 Flash: $0.14/$0.28/M tokens (vs Haiku $0.80/$4) When ATLAS_API_KEY is set: - DefaultModel() returns deepseek-v4-pro (interactive: chat, agent) - BackgroundModel() returns deepseek-v4-flash (summaries, tags, moderation, topics) - Premium agent tier stays on Claude Opus via Anthropic When ATLAS_API_KEY is not set, everything falls back to Anthropic exactly as before — no behaviour change without the env var. Implementation: - generateAtlas() — OpenAI-compatible /chat/completions endpoint - isAtlasModel() — routes deepseek/qwen/glm/kimi/minimax models to Atlas Cloud, everything else to Anthropic - DefaultModel() / BackgroundModel() — centralised model selection so callers don't hardcode model strings - All hardcoded "claude-haiku-4-5-20251001" references in chat.go and search/topics.go replaced with ai.BackgroundModel() Expected savings: ~80% on interactive, ~95% on background tasks when Atlas Cloud is enabled. https://claude.ai/code/session_01GRGLA9yj7BpqKiyi6xFwnm
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.
No description provided.