cohere-common-errors

Featured

Diagnose and fix Cohere API v2 errors and exceptions. Use when encountering Cohere errors, debugging failed requests, or troubleshooting CohereError, CohereTimeoutError, rate limits. Trigger with phrases like "cohere error", "fix cohere", "cohere not working", "debug cohere", "cohere 429", "cohere 400".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Cohere Common Errors ## Overview Quick reference for real Cohere API v2 errors with exact messages, causes, and fixes. ## Prerequisites - `cohere-ai` SDK installed - `CO_API_KEY` configured - Access to error logs ## Error Reference ### 400 — Bad Request: Missing Required Field ``` CohereError: model is required ``` **Cause:** API v2 requires `model` for all endpoints (Chat, Embed, Rerank, Classify). **Fix:** ```typescript // Wrong (v1 style) await cohere.chat({ messages: [...] }); // Correct (v2) await cohere.chat({ model: 'command-a-03-2025', messages: [...] }); ``` --- ### 400 — Embed: Missing embedding_types ``` CohereError: embedding_types is required for embed models v3 and higher ``` **Fix:** ```typescript await cohere.embed({ model: 'embed-v4.0', texts: ['hello'], inputType: 'search_document', embeddingTypes: ['float'], // Required for v3+ }); ``` --- ### 400 — Embed: Missing input_type ``` CohereError: input_type is required for embed models v3 and higher ``` **Fix:** Use one of: `search_document`, `search_query`, `classification`, `clustering`, `image`. --- ### 401 — Invalid API Token ``` CohereError: invalid api token ``` **Cause:** `CO_API_KEY` is missing, wrong, or revoked. **Fix:** ```bash # Verify key is set echo $CO_API_KEY # Test directly curl -H "Authorization: Bearer $CO_API_KEY" \ https://api.cohere.com/v2/chat \ -H "Content-Type: application/json" \ -d '{"model":"command-r7b-12-2024","messages":[{"role":"user","conten...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

cohere-install-auth

Install and configure Cohere SDK authentication with API v2. Use when setting up a new Cohere integration, configuring API keys, or initializing the CohereClientV2 in your project. Trigger with phrases like "install cohere", "setup cohere", "cohere auth", "configure cohere API key".

2,266 Updated today
jeremylongshore
AI & Automation Featured

cohere-hello-world

Create a minimal working Cohere example with Chat, Embed, and Rerank. Use when starting a new Cohere integration, testing your setup, or learning basic Cohere API v2 patterns. Trigger with phrases like "cohere hello world", "cohere example", "cohere quick start", "simple cohere code".

2,266 Updated today
jeremylongshore
AI & Automation Featured

cohere-sdk-patterns

Apply production-ready Cohere SDK patterns for TypeScript and Python. Use when implementing Cohere integrations, refactoring SDK usage, or establishing team coding standards for Cohere API v2. Trigger with phrases like "cohere SDK patterns", "cohere best practices", "cohere code patterns", "idiomatic cohere", "cohere wrapper".

2,266 Updated today
jeremylongshore
AI & Automation Featured

cohere-observability

Set up comprehensive observability for Cohere API v2 with metrics, traces, and alerts. Use when implementing monitoring for Chat/Embed/Rerank operations, setting up dashboards, or configuring alerts for Cohere integrations. Trigger with phrases like "cohere monitoring", "cohere metrics", "cohere observability", "monitor cohere", "cohere alerts", "cohere tracing".

2,266 Updated today
jeremylongshore
AI & Automation Featured

anth-common-errors

Diagnose and fix Anthropic Claude API errors by HTTP status code. Use when encountering API errors, debugging failed requests, or troubleshooting authentication, rate limiting, or input validation issues. Trigger with phrases like "anthropic error", "claude api error", "fix anthropic 429", "claude not working", "debug claude api".

2,266 Updated today
jeremylongshore