Cohere SDK Patterns Overview Production-ready patterns for the TypeScript SDK (CohereClientV2) and Python package. Real model names, real API shapes, real error types. Prerequisites - v7+ installed (TypeScript) or v5+ (Python) - Familiarity with async/await patterns - Understanding of Cohere API v2 endpoints Instructions Pattern 1: Singleton Client with Retry Pattern 2: Type-Safe Chat Wrapper Pattern 3: Streaming Chat Pattern 4: Batch Embedding Pattern 5: Rerank with Type Safety Pattern 6: Structured JSON Output Python Equivalents Error Handling | Error Type | When | Recovery | |------------|…