Migrate from Cohere API v1 to v2 and upgrade SDK versions.
Use when upgrading cohere-ai SDK, migrating from CohereClient to CohereClientV2,
or handling breaking changes between API versions.
Trigger with phrases like "upgrade cohere", "cohere migration",
"cohere v1 to v2", "update cohere SDK", "cohere breaking changes".
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
A direct command skips the review prompt. Inspect the source before running it.
The command stays on one line. Scroll horizontally to inspect it before copying.
Prefer a local copy? Download the files currently available to SkillsMP.
Showing SKILL.md
SKILL.md
Source instructions · Read-only preview
name
cohere-upgrade-migration
description
Migrate from Cohere API v1 to v2 and upgrade SDK versions.
Use when upgrading cohere-ai SDK, migrating from CohereClient to CohereClientV2,
or handling breaking changes between API versions.
Trigger with phrases like "upgrade cohere", "cohere migration",
"cohere v1 to v2", "update cohere SDK", "cohere breaking changes".
allowed-tools
Read, Write, Edit, Bash(npm:*), Bash(git:*)
version
1.5.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
["saas","ai","nlp","cohere"]
compatibility
Designed for Claude Code
Cohere Upgrade & Migration
Overview
Guide for migrating from Cohere API v1 to v2 and upgrading the cohere-ai TypeScript / cohere Python SDK. Covers every breaking change with before/after code.
Prerequisites
Current Cohere SDK installed
Git for version control
Test suite available
Instructions
Step 1: Check Current Version
# TypeScript
npm list cohere-ai
# Python
pip show cohere
# Latest versions
npm view cohere-ai version
pip index versions cohere
npm test# Fix any type errors from changed response shapes# Key changes: response.text → response.message?.content?.[0]?.text# response.citations → response.message?.citations
git add -A
git commit -m "chore: migrate to Cohere API v2"