# free-claude-code | Ali Khokhar | Knowledge Base | Instagit

Use claude-code for free in the terminal, VSCode extension or via discord like openclaw

GitHub Stars: 8k

Repository: https://github.com/Alishahryar1/free-claude-code

---

## Articles

### [How Optimization Handlers in free-claude-code Mock Specific Request Types](/Alishahryar1/free-claude-code/how-do-optimization-handlers-mock-request-types)

Discover how free-claude-code's optimization handlers mock specific request types by intercepting API calls and returning fabricated responses, enhancing your development workflow.

- Tags: how-to-guide
- Published: 2026-04-24

### [API Dependency Injection Mechanism in Free-Claude-Code: FastAPI Provider Architecture Explained](/Alishahryar1/free-claude-code/how-does-api-dependency-injection-work)

Discover the API dependency injection in Free Claude Code FastAPI. Learn how provider architecture injects runtime config and LLM instances for seamless integration.

- Tags: architecture
- Published: 2026-04-24

### [How the free-claude-code CLI Session Manager Spawns and Manages Subprocesses](/Alishahryar1/free-claude-code/how-does-cli-session-manager-handle-subprocess-spawning)

Learn how the free-claude-code CLI session manager spawns and manages subprocesses using asyncio for efficient execution and robust cleanup.

- Tags: internals
- Published: 2026-04-24

### [How free-claude-code Implements Concurrency Limiting with PROVIDER_MAX_CONCURRENCY](/Alishahryar1/free-claude-code/how-does-concurrency-limiting-work-with-provider-max-concurrency)

Leverage PROVIDER_MAX_CONCURRENCY in free-claude-code to limit concurrent LLM streams. Discover how asyncio Semaphore manages request blocking for efficient concurrency control.

- Tags: internals
- Published: 2026-04-24

### [Messaging Platform Abstraction Layer in Free‑Claude‑Code: Architecture and Implementation](/Alishahryar1/free-claude-code/how-does-messaging-platform-abstraction-work)

Explore the Messaging Platform Abstraction Layer in Free-Claude-Code. Swap messaging services like Telegram or Discord seamlessly with platform adapters and a factory function, keeping core logic intact.

- Tags: architecture
- Published: 2026-04-24

### [How free-claude-code Handles FastAPI Request Detection and Routing: A Complete Technical Guide](/Alishahryar1/free-claude-code/how-does-fastapi-app-handle-request-routing)

Discover how free-claude-code handles FastAPI request detection and routing. Learn about pure-Python helpers for instant vs. streamed responses in this technical guide.

- Tags: deep-dive
- Published: 2026-04-24

### [How to Configure Provider-Specific Proxy Settings for free-claude-code](/Alishahryar1/free-claude-code/how-to-configure-provider-specific-proxy-settings)

Learn how to configure provider-specific proxy settings for free-claude-code using environment variables like NVIDIA NIM PROXY OPENROUTER PROXY and more. Route traffic effectively.

- Tags: how-to-guide
- Published: 2026-04-24

### [How the Free-Claude-Code Message Converter Translates Anthropic to OpenAI Formats](/Alishahryar1/free-claude-code/how-does-message-converter-translate-anthropic-openai-formats)

Understand how the free-claude-code message converter translates Anthropic to OpenAI formats. Learn about block normalization, tool result splitting, and XML tagging for seamless integration.

- Tags: internals
- Published: 2026-04-24

### [How ANTHROPIC_AUTH_TOKEN Authentication Works in Free-Claude-Code: A Complete Guide](/Alishahryar1/free-claude-code/how-does-authentication-work-with-anthropic-auth-token)

Learn how free-claude-code secures API requests with ANTHROPIC_AUTH_TOKEN. This guide details its authentication methods and fallback open access.

- Tags: deep-dive
- Published: 2026-04-24

### [How Subagent Interception Controls Background Task Execution in free-claude-code](/Alishahryar1/free-claude-code/how-subagent-interception-controls-task-tool-execution)

Discover how subagent interception in free-claude-code enforces synchronous Task tool execution by rewriting run_in_background and tracking sub-agent lifecycle.

- Tags: internals
- Published: 2026-04-24

### [How free-claude-code Maps Provider Errors to the Anthropic Error Format](/Alishahryar1/free-claude-code/how-does-error-mapping-translate-provider-errors)

Learn how free-claude-code maps provider errors to the Anthropic error format using FastAPI exception handlers. It normalizes downstream LLM provider exceptions into a unified ProviderError hierarchy.

- Tags: how-to-guide
- Published: 2026-04-24

### [How to Add a New OpenAI-Compatible Provider to free-claude-code](/Alishahryar1/free-claude-code/how-to-add-new-openai-compatible-provider)

Add a new OpenAI compatible provider to free-claude-code by subclassing OpenAICompatibleProvider and integrating it into the factory. Learn the simple steps to extend your provider options.

- Tags: how-to-guide
- Published: 2026-04-24

### [How the Provider Factory in free-claude-code Creates and Manages Provider Instances](/Alishahryar1/free-claude-code/how-does-provider-factory-create-manage-instances)

Discover how the free-claude-code provider factory uses singleton caching to efficiently create and manage AI provider instances, reusing HTTP clients and rate limiters for optimal performance.

- Tags: internals
- Published: 2026-04-24

### [How Free-Claude-Code Implements Voice Note Transcription Functionality with OpenAI Whisper](/Alishahryar1/free-claude-code/how-does-voice-note-transcription-work-with-whisper)

Discover how Free-Claude-Code uses OpenAI Whisper in its transcribe audio function to convert audio files to text. Explore local and cloud transcription options.

- Tags: how-to-guide
- Published: 2026-04-24

### [How free-claude-code Implements Session Persistence Across Server Restarts in FastAPI](/Alishahryar1/free-claude-code/how-does-session-persistence-work-across-restarts)

Discover how free-claude-code achieves session persistence across server restarts using atomic JSON files and debounced writes in FastAPI. Learn about efficient state management.

- Tags: internals
- Published: 2026-04-24

### [How Tree-Based Conversation Threading Works in free-claude-code](/Alishahryar1/free-claude-code/how-does-tree-based-conversation-threading-work)

Discover how free-claude-code uses tree-based conversation threading with directed acyclic graphs, MessageNode objects, immutable data, O(1) lookups, and async queue processors for efficient chat management.

- Tags: internals
- Published: 2026-04-24

### [How to Set Up Discord Messaging Platform Integration for Free-Claude-Code](/Alishahryar1/free-claude-code/how-to-set-up-discord-messaging-platform)

Integrate free-claude-code with Discord. Install discord.py, set your bot token, and instantiate the platform to activate Discord bot features. Get started today.

- Tags: how-to-guide
- Published: 2026-04-24

### [How the SSE Builder in free-claude-code Converts Provider Responses to Anthropic SSE Format](/Alishahryar1/free-claude-code/how-sse-builder-converts-responses-to-anthropic-sse)

Learn how the SSE builder in free-claude-code converts provider responses to Anthropic SSE format. Manage message lifecycles, content blocks, and tool calls seamlessly.

- Tags: internals
- Published: 2026-04-24

### [Rate Limiting System in Free-Claude-Code: Implementing Strict Rolling Windows](/Alishahryar1/free-claude-code/how-does-rate-limiting-work-with-rolling-windows)

Discover how Free-Claude-Code uses a strict rolling-window rate limiting system with reactive blocking, proactive throttling, and concurrency caps to prevent API quota violations. Learn about the GlobalRateLimiter class impleme...

- Tags: internals
- Published: 2026-04-24

### [Free-Claude-Code Request Optimization: How It Intercepts Trivial API Calls Locally](/Alishahryar1/free-claude-code/how-request-optimization-intercepts-api-calls-locally)

Discover how free-claude-code optimizes requests by intercepting trivial API calls locally, fabricating responses for common queries to cut latency and costs.

- Tags: internals
- Published: 2026-04-24

### [How the Heuristic Tool Parser in free-claude-code Detects and Converts Text Tool Calls](/Alishahryar1/free-claude-code/how-does-heuristic-tool-parser-detect-text-tool-calls)

Discover how the heuristic tool parser in free-claude-code detects text tool calls using the ● trigger and regex. Learn how it converts calls into Anthropic tool_use blocks.

- Tags: deep-dive
- Published: 2026-04-24

### [world"` before processing, ensuring the inner reasoning is recognized as a single `THINKING` chunk despite arriving in f](/Alishahryar1/free-claude-code/how-does-thinking-token-parsing-work-with-enable-thinking)

Discover how free-claude-code handles THINKING token parsing with ENABLE_THINKING. Learn to process fragmented reasoning efficiently for better AI code execution.

- Tags: internals
- Published: 2026-04-24

### [How Free-Claude-Code Implements Per-Model Routing for MODEL_OPUS, MODEL_SONNET, and MODEL_HAIKU](/Alishahryar1/free-claude-code/how-does-model-routing-work-in-free-claude-code)

Discover how Free-Claude-Code uses environment overrides and Settings.resolve_model() for per-model routing across MODEL_OPUS, MODEL_SONNET, and MODEL_HAIKU. Learn to map Claude models efficiently.

- Tags: internals
- Published: 2026-04-24

### [How free-claude-code Routes Requests to NVIDIA NIM, OpenRouter, DeepSeek, and LM Studio](/Alishahryar1/free-claude-code/how-does-free-claude-code-proxy-route-requests-to-llm-providers)

Learn how free-claude-code routes requests to NVIDIA NIM, OpenRouter, DeepSeek, and LM Studio using a dynamic FastAPI system. Converts Claude messages to OpenAI streaming calls.

- Tags: internals
- Published: 2026-04-24

