models-and-providers
Guides agents through Pydantic AI model selection, provider configuration, optional extras, native tools, embeddings, wrappers, fallback, concurrency, and provider troubleshooting.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- models-and-providers
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Guides agents through Pydantic AI model selection, provider configuration, optional extras, native tools, embeddings, wrappers, fallback, concurrency, and provider troubleshooting.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/model-selection.md8.1 KB
- 参考文档references/native-tools-and-embeddings.md6.2 KB
- 参考文档references/provider-installation.md7.5 KB
- 参考文档references/troubleshooting.md7.6 KB
- 脚本scripts/check_optional_provider.py9.8 KB
03 SKILL.md 正文
Models and Providers
Use this sub-skill when a task involves choosing a Pydantic AI model string, configuring a provider or profile, installing optional provider dependencies, wrapping models for fallback/concurrency/instrumentation, adding provider-native tools, using embeddings, or diagnosing provider import/auth/settings failures.
Read First
- Read references/model-selection.md to choose
provider:model-namestrings, direct model/provider/profile classes,ModelSettings,known_model_names(),FallbackModel,ConcurrencyLimitedModel, andInstrumentedModel. - Read references/provider-installation.md to map model strings, providers, embeddings, and common tools to the smallest
pydantic-ai-slim[...]extra and environment-variable checklist. - Read references/native-tools-and-embeddings.md when adding provider-native
WebSearchTool,CodeExecutionTool,MCPServerTool,FileSearchTool, embedding workflows, or common tools that require extras. - Read references/troubleshooting.md to debug missing provider prefixes, optional SDK imports, API keys, Google/Vertex naming, profile/schema incompatibilities, fallback timing, and native-tool failures.
- Run scripts/check_optional_provider.py for a no-network import/config diagnostic for selected model, embedding, or common-tool providers.
Route Elsewhere
- Use
../agent-core/forAgentconstruction, run modes, dependencies, streaming, message history, and deterministicTestModel/FunctionModeltesting. - Use
../tools-and-toolsets/for Python function tools, tool schemas, toolsets, approvals, deferred tools, andModelRetrydesign. - Use
../outputs-and-messages/forNativeOutput, structured output support, message parts, multimodal content, and output/history serialization. - Use
../mcp-and-integrations/for MCP client/server lifecycles, provider-adaptive capabilities, Logfire, UI adapters, and durable execution integrations. - Use
../cli-and-apps/forclai,pai, web UI, and command-line model flags.
Operating Rules
- Prefer provider-prefixed strings such as
openai:gpt-5.2,anthropic:claude-opus-4-6,google:gemini-3-pro-preview, oropenrouter:google/gemini-3-pro-previewwhen portability is enough. - Instantiate concrete model/provider classes only when customizing authentication, base URLs, HTTP clients, profiles, default settings, retries, or gateway behavior.
- Treat cloud SDKs, credentials, native tools, common web tools, and embeddings as optional: diagnose imports and configuration locally before claiming provider access.
- Do not run cloud verification scripts or upload helpers as part of this runtime skill; credentialed Bedrock, Vertex/GCS, and file-upload scripts are source evidence only and are intentionally excluded.
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).