model_switch

command
v0.6.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Command model_switch continues one conversation across two protocols.

Turn 1 goes to DeepSeek, which speaks OpenAI-compatible Chat Completions. Turn 2 sends the same history — unchanged — to MiniMax on its China endpoint, which speaks Anthropic-compatible Messages. The caller does not rebuild the conversation: llm re-adapts the stored history for the target protocol on each request (downgrading images, reconciling tool-call IDs, and so on).

Because the two turns use different protocols, both provider packages must be registered. Each needs its own key:

DEEPSEEK_API_KEY=sk-...   (DeepSeek, OpenAI-compatible)
MINIMAX_CN_API_KEY=...    (MiniMax CN, Anthropic-compatible)

DEEPSEEK_API_KEY=... MINIMAX_CN_API_KEY=... go run ./example/llm/model_switch

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL