Enable copilot to collaborate with multiple models
This skill packages a repeatable OpenAI-compatible model conversation workflow.
API_KEY + MODEL_ID pair.alias -> baseurl -> apikey -> modelid.alias, baseurl, apikey, and modelid one-by-one in chat.baseurl is mandatory and must be provided explicitly (no default value).alias/modelid from template defaults.note is optional and may be left empty; accept skip / 跳过 / - as empty note when chat UI cannot send blank messages..3rd.env as WING_MODELS_PROFILE_SET.alias:key:model text format is not supported.--alias is mandatory; script will error if alias is not provided.If no profile set exists and the script is interactive, prompt user to enter profile entries.
When an agent needs to create .3rd.env directly after collecting fields in chat, use this structure:
WING_MODELS_PROFILE_SET=[{"alias":"<alias-from-chat>","baseURL":"https://openrouter.ai/api/v1","apiKey":"<api-key-from-chat>","modelId":"<model-id-from-chat>","note":""}]
This skill works with any OpenAI-compatible API, including:
https://openrouter.ai/api/v1)https://api.openai.com/v1)https://YOUR_RESOURCE.openai.azure.com/openai/deployments/YOUR_DEPLOYMENT)http://localhost:11434/v1 for Ollama)<cwd>/.*-dialogue.md (question + answer; attachment sections record paths only)*-attachment-<n>.<ext> files<skill-dir>/.3rd.env.3rd.env with restrictive permissions.Before reading saved model output files (.md or attachments):
./scripts/wing_models.mjs./scripts/package.jsonopenaidotenv./.3rd.env.templateBefore executing the script, always verify runtime prerequisites automatically:
node --version to verify Node.js is installed and accessible.npm --version to verify npm is installed and accessible.npm list --prefix <skill-dir>/scripts openai dotenv to verify both dependencies are installed.If any check fails:
node or npm is unavailable, report the missing tool and halt execution. Ask user to install Node.js first.npm install --prefix <skill-dir>/scripts
# Step 1: Check node
node --version || { echo "Node.js not found. Please install Node.js."; exit 1; }
# Step 2: Check npm
npm --version || { echo "npm not found. Please install Node.js with npm."; exit 1; }
# Step 3: Check dependencies
npm list --prefix <skill-dir>/scripts openai dotenv 2>/dev/null || npm install --prefix <skill-dir>/scripts
# Step 4: Proceed with script
node <skill-dir>/scripts/wing_models.mjs --alias <alias> --prompt "<prompt>"
For first-time use or after clearing node_modules, the above pattern ensures dependencies are installed transparently without manual intervention.
Install once:
npm install --prefix <skill-dir>/scripts
Call template:
node <skill-dir>/scripts/wing_models.mjs \
--alias <alias> \
--prompt "<user-prompt>"
Long prompt template:
node <skill-dir>/scripts/wing_models.mjs \
--alias <alias> \
--prompt-file <path-to-prompt.txt>
With attachment input (repeatable):
node <skill-dir>/scripts/wing_models.mjs \
--alias <alias> \
--prompt "<user-prompt>" \
--attachment <path-or-url>
--prompt-file over shell heredoc/complex quoting.[TEXT_FILE] path as source of truth for full output.[ROUTE] marker for provider/alias/model/baseURL decisions when debugging.