Cohere API & SDK Migration

•
2.1k
•

Automates the migration of applications from Cohere API v1 to v2 while upgrading SDK versions and handling breaking changes.

This skill provides a comprehensive framework for transitioning software projects from the legacy Cohere v1 API to the modern v2 architecture. It guides Claude through updating TypeScript and Python SDKs, refactoring chat message formats to be OpenAI-compatible, mapping deprecated role names, and ensuring that required parameters like model IDs and embedding types are correctly implemented. It is particularly useful for developers maintaining AI-powered applications that need to leverage the latest Cohere features, improved performance, and new model releases like Command R+.

主な機能

01Identifies and updates deprecated model IDs to current equivalents
022,145 GitHub stars
03Maps legacy role names like USER/CHATBOT to modern standards
04Automated SDK version checking and upgrading for TypeScript and Python
05Implements OpenAI-compatible tool calling and RAG document formats
06Refactors Chat and Embed endpoints to meet v2 requirements

ユースケース

01Upgrading production applications from Cohere v1 to v2 for better performance
02Refactoring legacy chat logic to use the new messages array format
03Updating embedding and reranking logic to comply with mandatory v2 parameters