local-agent-model-defaults
Use when creating or modifying AI agent projects and choosing a model, API key, OpenAI-compatible base URL, LiteLLM endpoint, or related environment variables.
- License 许可
- MIT
- 所属仓库
- ydf0509/lc-agent
- 最近更新
- 2026-11-05
- Stars
- ★ 8
- Forks
- 2
01 前言 Front Matter
- name
- local-agent-model-defaults
- description
- Use when creating or modifying AI agent projects and choosing a model, API key, OpenAI-compatible base URL, LiteLLM endpoint, or related environment variables.
02 资源文件 1
- 参考文档agents/openai.yaml240 B
03 SKILL.md 正文
Local Agent Model Defaults
Use these personal defaults for AI agent projects unless the user or the project explicitly specifies another provider, model, API key, or endpoint.
Local LiteLLM Defaults
Prefer the local OpenAI-compatible LiteLLM proxy on port 4000:
OPENAI_API_KEY=sk-no-key-needed
OPENAI_BASE_URL=http://localhost:4000/v1
OPENAI_MODEL=ds-deepseek-v4-flash
The OpenAI-compatible client uses http://localhost:4000/v1 as its base URL and sends chat requests to /chat/completions. The local proxy does not require a real provider API key, so sk-no-key-needed is the intended placeholder.
In lc-agent's config.jsonc, the same model name goes into BOTH required fields of a model entry: model_id (your own globally-unique name — identity, stats, display) and raw_model_id (the channel-provided original model name — pricing fallback + stats merging). Under this LiteLLM proxy both values are identical, e.g. {"model_id": "ds-deepseek-v4-flash", "raw_model_id": "ds-deepseek-v4-flash"}. Missing fields or uniqueness conflicts (model_id global-unique; (provider, raw_model_id) unique) fail at startup with a full problem list.
Decision Rules
- Use the local LiteLLM values above when an AI agent implementation needs model configuration and no explicit alternative is requested.
- Preserve an explicit model, provider, base URL, or secret supplied by the user or already required by the project.
- Never invent or request a real external API key when the local LiteLLM proxy is the intended backend.
- Keep secrets out of source control; use environment variables or the project's existing configuration mechanism.
Example
For a new OpenAI-compatible agent configuration, use:
from langchain_openai import ChatOpenAI
model = ChatOpenAI(
model="ds-deepseek-v4-flash",
api_key="sk-no-key-needed",
base_url="http://localhost:4000/v1",
)
04 同仓库更多 Skills
vision-bridge
暂无简介
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
writing-plans
Use when you have a spec or requirements for a multi-step task, before touching code
verification-before-completion
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
using-superpowers
Use when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions
using-git-worktrees
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback