llm-and-providers
Guides agents configuring CrewAI LLM providers, model strings, credentials, base URLs, Azure/OpenAI-compatible/Anthropic/Bedrock/Google/Snowflake settings, streaming, tool calls, custom BaseLLM implementations, and LiteLLM migration caveats.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- llm-and-providers
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Guides agents configuring CrewAI LLM providers, model strings, credentials, base URLs, Azure/OpenAI-compatible/Anthropic/Bedrock/Google/Snowflake settings, streaming, tool calls, custom BaseLLM implementations, and LiteLLM migration caveats.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/custom-llm.md7.4 KB
- 参考文档references/provider-reference.md10.9 KB
- 参考文档references/streaming-and-tool-calls.md7.5 KB
- 参考文档references/troubleshooting.md7.6 KB
- 脚本scripts/check_llm_config.py10.7 KB
03 SKILL.md 正文
LLM and Providers
Use this sub-skill when the task is to configure, validate, migrate, or troubleshoot CrewAI LLM objects, provider model strings, API keys, base URLs, structured responses, tool-calling LLM behavior, streaming LLM behavior, context windows, rate-limit knobs, or custom BaseLLM implementations.
Read First
- Provider reference for the current
LLMconstructor shape, provider dispatch rules, model prefixes, credentials, base URL handling, Azure/OpenAI-compatible/Anthropic/Bedrock/Google/Snowflake examples, context-window notes, and LiteLLM fallback rules. - Custom LLM for implementing
BaseLLM, requiredcall()/acall()contracts, function calling, stop words, context windows, error handling, and safe test doubles. - Streaming and tool calls for
stream=True, directLLM.call()/acall(), Crew/Flow streaming outputs,function_calling_llm, response models, and provider compatibility trade-offs. - Troubleshooting for missing API keys, wrong prefixes, OpenAI-compatible base URL confusion, streaming/tool-call incompatibility,
response_formatmisuse, multimodal mismatch, rate limits, context windows, and LiteLLM migration mistakes. - Offline config checker for a no-network diagnostic of model/provider/base URL/env-var choices; run
python scripts/check_llm_config.py --helpbefore using it.
Boundaries
- Stay here for
LLM(...)parameters, provider selection, credentials, API keys, base URLs,api_version, structured response formats, streaming, direct LLM calls, tool-call provider compatibility, custom LLM classes, and LiteLLM migration. - Use ../core-runtime/SKILL.md for where to attach
llm,manager_llm,planning_llm,chat_llm, orfunction_calling_llmonAgent,Crew, and project runtime definitions. - Use ../tools-and-mcp/SKILL.md for implementing CrewAI tools, MCP adapters, and tool schema design beyond LLM provider support.
- Use ../files-and-multimodal/SKILL.md for file input payload shapes, upload/cache behavior, MIME constraints, and provider-specific file limits.
- Use ../observability-and-hooks/SKILL.md for tracing, event listeners, transport interceptors, and observability integrations around LLM calls.
- Return to ../../SKILL.md when a request spans multiple CrewAI capability areas and needs root routing context.
Safe Defaults
- Prefer explicit
LLM(model="provider/model-name", ...)objects for non-trivial configuration; plain strings are fine only when defaults and environment variables are already correct. - Prefer native providers (
openai,anthropic,gemini/google,azure,bedrock,snowflake, and built-in OpenAI-compatible providers) before addingcrewai[litellm]. - Never print, commit, or hard-code real API keys. Use environment variable names or placeholders in examples.
- Validate configuration offline with scripts/check_llm_config.py before running crews that may make network or LLM calls.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).