AGENT SKILL

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

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-name strings, direct model/provider/profile classes, ModelSettings, known_model_names(), FallbackModel, ConcurrencyLimitedModel, and InstrumentedModel.
  • 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/ for Agent construction, run modes, dependencies, streaming, message history, and deterministic TestModel/FunctionModel testing.
  • Use ../tools-and-toolsets/ for Python function tools, tool schemas, toolsets, approvals, deferred tools, and ModelRetry design.
  • Use ../outputs-and-messages/ for NativeOutput, 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/ for clai, 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, or openrouter:google/gemini-3-pro-preview when 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

VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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).

★ 351