PixelRouter — Sub-35ms AI Gateway & SDK Guidelines logo

PixelRouter — Sub-35ms AI Gateway & SDK Guidelines

0

Developer guidelines and SDK integration patterns for PixelRouter sub-35ms European OpenAI-compatible gateway, LiteLLM, and autonomous agents.

1 rule

Add to Cursor
--- description: Best practices and code patterns for integrating PixelRouter sub-35ms OpenAI-compatible edge gateway and LiteLLM. globs: ["**/*.{py,ts,js}"] alwaysApply: false --- # PixelRouter SDK & Integration Standards When developing applications, backend services, or autonomous agents using the PixelRouter gateway, follow these implementation standards: ## 1. Python Integration with LiteLLM & LangChain Always use environment variables for authentication and configure the unified European edge base URL: import os from pixeloffice_router import register_litellm import litellm # Register sub-35ms edge gateway register_litellm() response = litellm.completion( model="pixelrouter/blun-auto", messages=[{"role": "user", "content": "Process request"}] ) ## 2. Node.js / TypeScript Direct OpenAI Client When initializing the official OpenAI client in TypeScript: import OpenAI from 'openai'; export const pixelRouterClient = new OpenAI({ baseURL: process.env.PIXELROUTER_BASE_URL || 'https://api.pixeloffice.eu/v1', apiKey: process.env.PIXELROUTER_API_KEY, }); ## 3. Model Routing Strategy - Use claude-3.5-sonnet for heavy architectural logic and code generation. - Use thinkingcap-27b for deep algorithmic reasoning. - Use deepseek-chat for cost-effective high-throughput jobs. - Use blun-auto for autonomous multi-model routing. Official Documentation: https://pixeloffice.eu/router.html