SShortSingh.
Back to feed

How one developer runs Claude Code across two cost tiers using a self-hosted proxy

0
·3 views

A developer has configured Claude Code to operate across two trust levels — one using a paid Anthropic subscription for high-stakes tasks, and another routed through a self-hosted LiteLLM proxy to cheaper DeepSeek models for exploratory or low-priority work. Because Claude Code only communicates via Anthropic's Messages API, the setup required pointing the ANTHROPIC_BASE_URL environment variable to LiteLLM's Anthropic-compatible endpoint rather than its OpenAI-shaped path. A key obstacle was Claude Code's Plan Mode, which sends an unsupported parameter that causes non-Anthropic backends to return a 400 error; this was resolved by enabling LiteLLM's drop_params option to silently strip unrecognized fields. To prevent accidentally using the cheaper, less reliable session for critical work, the developer gave the two agents visually distinct terminal environments — keeping the premium session plain and wrapping the cheap one in a clearly labelled subshell. The approach relies on a persistent SSH tunnel from a VPS to route proxy traffic consistently across multiple machines.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

OliverGraph Aims to Give AI Agents Shared Context Across Engineering Teams

A startup called OliverGraph is building a platform to address a growing problem in software teams: AI coding agents operate in isolated sessions, causing critical context to be lost when a run ends. When multiple engineers use separate agents simultaneously — such as during an outage — findings and decisions made by one agent are invisible to others, leading to duplicated or conflicting work. The tool aims to capture what each agent did, why it acted, and what it changed, then link that history to existing artifacts like pull requests, documents, and incidents. This connected history can then be fed back into future agent sessions, so new agents benefit from what previous ones already learned. OliverGraph is currently seeking early-adopter engineering teams to trial the platform.

0
ProgrammingDEV Community ·

How to Build a Secure Password Reset Email Flow Using an Email API

A developer tutorial on DEV Community outlines a step-by-step approach to implementing password reset emails in a backend application using an email API called Notify. The flow involves generating a cryptographically secure, short-lived token, storing only its hashed version in the database, and sending the raw token to the user via a reset link. When the user submits a new password, the backend hashes the received token, compares it against the stored hash, and invalidates it after a single use. The guide recommends a token expiry window of 15 to 60 minutes, enforcing HTTPS throughout, and rate-limiting reset requests to prevent abuse. It also covers optional webhook registration to automatically detect email bounces without manual intervention.

0
ProgrammingDEV Community ·

PawSafe App Uses Google Gemini AI to Tell Dog Owners Which Foods Are Safe

A developer has built PawSafe, an AI-powered web application designed to help dog owners quickly determine whether a particular food is safe for their pets. Users can submit a food name, upload a photo, or both, and the app returns one of four safety ratings along with explanations and safer alternatives. The tool is powered by Google's Gemini API, which handles both text and image analysis on the backend to keep the API key secure. Built with a React frontend and a Node.js/Express backend, PawSafe was created to spare dog owners the hassle of searching multiple sources for food safety information. The project was submitted to the DEV Community's Weekend Challenge: Dog Days Edition, competing in the Best Use of Google AI category.

0
ProgrammingDEV Community ·

Tutorial: AI Pipeline Uses GPT-4o and SAM to Estimate Calories from Food Photos

A new developer tutorial on DEV Community demonstrates how to build an automated food nutrition estimation system using a combination of AI tools. The pipeline uses Meta's Segment Anything Model (SAM) to isolate individual food items in an image before passing them to OpenAI's GPT-4o Vision for ingredient identification and weight estimation. To reduce the risk of AI-generated inaccuracies, the system cross-references GPT-4o outputs against a verified nutritional database stored in PostgreSQL using the pgvector extension for similarity search. The full-stack guide covers tools including FastAPI, PyTorch, and Python 3.10+, and is aimed at developers interested in multimodal AI, retrieval-augmented generation, and health-tech applications.