xiaohongshu
xiaohongshu
ai-model
Gère les modèles IA de Motivia. Utilise ce skill quand l'utilisateur demande d'ajouter un nouveau modèle IA, modifier un provider, ou configurer les options de génération. Supporte OpenAI, Anthropic, Google, Mistral et xAI.
Full skill instructions
utils/ai-model.tsx # Registry des modèles et providers
prisma/schema.prisma # Enum ApiProvider
components/icons/ # Icônes des providers
app/api/create/route.ts # Endpoint de génération
export type AIModelOption = {
provider: ApiProvider; // Enum Prisma: OPENAI, ANTHROPIC, GOOGLE, MISTRAL, XAI
model: string; // ID du modèle (ex: "gpt-5-nano-2025-08-07")
label: string; // Nom affiché (ex: "GPT 5 nano")
free: boolean; // true = utilise les lettres gratuites
cost: number; // Coût relatif (pour affichage)
};
| Provider | Enum | SDK |
|---|---|---|
| OpenAI | ApiProvider.OPENAI | @ai-sdk/openai |
| Anthropic | ApiProvider.ANTHROPIC | @ai-sdk/anthropic |
ApiProvider.GOOGLE | @ai-sdk/google | |
| Mistral | ApiProvider.MISTRAL | @ai-sdk/mistral |
| xAI | ApiProvider.XAI | @ai-sdk/xai |
// utils/ai-model.tsx
export const OPENAI_MODELS = [
// ... existing models
{
provider: ApiProvider.OPENAI,
model: "gpt-5-ultra-2025-xx-xx", // ID exact du modèle
label: "GPT 5 Ultra", // Nom affiché
free: false, // false = nécessite clé API
cost: 50, // Coût relatif
},
];
export const modelOptions: AIModelOption[] = [
...OPENAI_MODELS,
...ANTHROPIC_MODELS,
...MISTRAL_MODELS,
...XAI_MODELS,
];
pnpm add @ai-sdk/newprovider
// prisma/schema.prisma
enum ApiProvider {
OPENAI
ANTHROPIC
GOOGLE
MISTRAL
XAI
NEWPROVIDER // Ajouter ici
}
pnpm prisma migrate dev --name add_newprovider
// components/icons/newprovider-icon.tsx
export const NewProviderIcon = ({ className }: { className?: string }) => (
<svg className={className} viewBox="0 0 24 24">
{/* SVG path */}
</svg>
);
// utils/ai-model.tsx
import { createNewProvider } from "@ai-sdk/newprovider";
import { NewProviderIcon } from "@/components/icons";
// Dans providersLabelAndIcon
{
label: "New Provider",
value: ApiProvider.NEWPROVIDER,
image: <NewProviderIcon className="size-6" />,
},
// Dans les modèles
export const NEWPROVIDER_MODELS = [
{
provider: ApiProvider.NEWPROVIDER,
model: "model-id",
label: "Model Name",
free: false,
cost: 10,
},
];
// Dans modelOptions
export const modelOptions: AIModelOption[] = [
...OPENAI_MODELS,
...ANTHROPIC_MODELS,
...MISTRAL_MODELS,
...XAI_MODELS,
...NEWPROVIDER_MODELS, // Ajouter ici
];
// Dans registry
export const registry = (apiKey?: string, provider?: ApiProvider) =>
createProviderRegistry({
// ... existing
NEWPROVIDER: createNewProvider({
apiKey:
provider === ApiProvider.NEWPROVIDER && apiKey
? apiKey
: process.env.NEWPROVIDER_API_KEY,
}),
});
NEWPROVIDER_API_KEY=sk-...
free: true utilise les 5 lettres gratuites de l'utilisateurfreeLetters === 0, l'utilisateur doit avoir sa propre clé APILe champ cost est indicatif et sert à l'affichage. Valeurs suggérées:
| Gamme | Cost | Exemple |
|---|---|---|
| Économique | 0-1 | nano, small |
| Standard | 2-5 | mini, medium |
| Premium | 10-15 | sonnet, medium |
| Ultra | 20+ | opus |
Le flow dans app/api/create/route.ts:
freeLettersstreamObject{ title, content }free bien défini (true/false)cost relatif définimodelOptionsxiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience