aiconfig-update

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

AI Config Update & Lifecycle

AI Config 更新与生命周期管理

You're using a skill that will guide you through updating, archiving, and deleting AI Configs and their variations. Your job is to understand the current state of the config, make the changes, and verify the result.
您正在使用的技能将引导您完成AI Config及其变体的更新、归档和删除操作。您的任务是了解配置的当前状态、进行更改并验证结果。

Prerequisites

前提条件

  • Existing AI Config to modify
  • LaunchDarkly API access token or MCP server
  • 存在可修改的AI Config
  • LaunchDarkly API访问令牌或MCP服务器

Core Principles

核心原则

  1. Fetch Before Changing: Always check the current state before modifying
  2. Verify After Changing: Fetch the config again to confirm updates were applied
  3. Archive Before Deleting: Archival is reversible; deletion is not
  1. 修改前先获取:在修改前务必检查当前状态
  2. 修改后验证:再次获取配置以确认更新已生效
  3. 删除前先归档:归档操作可撤销;删除操作不可撤销

API Key Detection

API密钥检测

  1. Check environment variables
    LAUNCHDARKLY_API_KEY
    ,
    LAUNCHDARKLY_API_TOKEN
    ,
    LD_API_KEY
  2. Check MCP config — If applicable
  3. Prompt user — Only if detection fails
  1. 检查环境变量
    LAUNCHDARKLY_API_KEY
    LAUNCHDARKLY_API_TOKEN
    LD_API_KEY
  2. 检查MCP配置 — 如适用
  3. 提示用户 — 仅在检测失败时执行

Workflow

工作流程

Step 1: Understand Current State

步骤1:了解当前状态

Fetch the config to see what exists before changing anything:
bash
GET /projects/{projectKey}/ai-configs/{configKey}
在进行任何更改前,先获取配置以查看现有内容:
bash
GET /projects/{projectKey}/ai-configs/{configKey}

Step 2: Make the Update

步骤2:执行更新操作

Follow API Quick Start:
  • Update instructions/messages — PATCH variation
  • Switch model — PATCH variation with modelConfigKey and model
  • Tune parameters — PATCH variation with model.parameters
  • Archive config — PATCH config with
    {"archived": true}
  • Delete — DELETE config or variation (irreversible)
遵循API快速入门
  • 更新指令/消息 — PATCH变体
  • 切换模型 — 使用modelConfigKey和model参数PATCH变体
  • 调整参数 — 使用model.parameters参数PATCH变体
  • 归档配置 — 使用
    {"archived": true}
    PATCH配置
  • 删除 — DELETE配置或变体(不可撤销)

Step 4: Verify

步骤4:验证

  1. Fetch updated config:
    bash
    GET /projects/{projectKey}/ai-configs/{configKey}/variations/{variationKey}
  2. Confirm the response shows your updated values
  3. Report results:
    • ✓ Update applied successfully
    • ✓ Config reflects changes
    • ⚠️ Flag any issues or rollback if needed
  1. 获取更新后的配置:
    bash
    GET /projects/{projectKey}/ai-configs/{configKey}/variations/{variationKey}
  2. 确认响应中显示您的更新值
  3. 报告结果:
    • ✓ 更新已成功应用
    • ✓ 配置已反映更改
    • ⚠️ 标记任何问题,必要时回滚

What NOT to Do

禁止操作

  • Don't update production directly without testing
  • Don't change multiple things at once
  • Don't skip verification
  • Don't delete without user confirmation
  • 不要在未测试的情况下直接更新生产环境
  • 不要同时更改多项内容
  • 不要跳过验证步骤
  • 不要在未获得用户确认的情况下执行删除操作

Related Skills

相关技能

  • aiconfig-variations
    — Create variations to test changes
  • aiconfig-tools
    — Update tools
  • aiconfig-variations
    — 创建变体以测试更改
  • aiconfig-tools
    — 更新工具

References

参考资料

  • API Quick Start
  • API快速入门