Logo vun Logfire Gateway

Logfire Gateway

Organisatioun
pydantic
logfire-gateway

Configure an application's model calls to use the Pydantic AI Gateway. Use when the user asks to route application inference through Gateway, connect a Gateway key, or add a Gateway provider snippet. This does not configure or instrument coding agents.

Iwwersiicht

Editeurpydantic
Repositoryskills
Skill-Nummlogfire-gateway
Stären
147
Forks
7
Matgeliwwert Fichieren
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    Vum pydantic op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Logfire Gateway an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/pydantic/skills/tree/main/plugins/logfire/skills/logfire-gateway
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/pydantic/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/plugins/logfire/skills/logfire-gateway .claude/skills/logfire-gateway
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Logfire Gateway an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Logfire Gateway automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Logfire Gateway net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Configure an Application with Pydantic AI Gateway

For observing or routing Claude Code/Codex itself, use coding-agent setup instead. Keep this application workflow separate from coding-session recording and provider setup.

Preserve the user's confirmed project, region, provider, and existing credential mechanism. An existing application Gateway key needs no CLI login or SDK write token. To create a key through the CLI, follow the CLI Gateway credential procedure. Use the UI's Gateway Connect flow when CLI access is unavailable.

Use this skill for model traffic, provider routing, and Gateway credentials. It is separate from logfire-instrumentation: a Logfire write token sends telemetry, while a Gateway key authorizes model requests. Do not substitute one for the other. Do not configure coding-agent providers, telemetry, or MCP integrations.

A prepared setup handoff may already identify the exact project and credentials. Reuse it rather than repeating authentication or selecting another project.

1. Identify the application

Before changing files, inspect the repository and identify the existing model client, model, provider, environment loader, and runnable entrypoint. If the request names an application or the repository contains a clear inference client, wire that application through Gateway. Preserve its provider protocol and model unless the user requests a change.

If there is no inference application or the target is ambiguous, ask which application the user wants to connect. Confirm a new application's purpose before scaffolding it.

A Gateway setup request authorizes routing the selected application's model calls through Gateway. Ordinary Logfire instrumentation does not imply that choice.

Continue this setup in the current agent. A prepared wizard handoff already finished account and project selection. Do not invoke the wizard again or launch another setup agent. Preserve the existing model client, provider abstraction, dependency versions, and environment conventions.

2. Handle credentials without exposing them

Reuse an existing Gateway credential provided through the repository's secret mechanism. Otherwise obtain a project-scoped Gateway key using the UI's Connect flow or the CLI credential procedure. Do not create a telemetry write token merely to configure an existing Gateway key. Never print the one-time secret in a recorded terminal or agent messages. Store it using the environment variable read by the selected SDK or Connect snippet: PYDANTIC_AI_GATEWAY_API_KEY for Pydantic AI. For other clients, keep the application's existing variable, or use LOGFIRE_GATEWAY_API_KEY and explicitly read it into the client's API-key option. Setting a variable alone does not make an arbitrary client consume it. Keep unrelated values intact. For a local environment file, require a gitignored regular file with user-only permissions, replace exactly one existing assignment or insert one, and write the file atomically. Never stage or commit the secret-bearing file or key to source control. Do not append duplicate assignments. If the existing secret mechanism cannot be updated safely, ask the user to install the key through their normal secret manager.

A downloaded Connect credential can use the same secret mechanism without printing or sourcing the downloaded file. Never put a key in agent messages, source code, logs, tests, or snapshots.

Use the environment variable expected by the selected SDK. Keep the key out of browser code and client-side bundles. Key creation does not activate Gateway, configure provider billing, or select a routing endpoint. If the public API rejects creation because Gateway is inactive or permission is missing, explain that specific prerequisite. Missing OAuth scope requires renewed consent with the needed permission; provider activation or billing requires Gateway settings. Do not activate paid provider access without the user's agreement. Reuse a successfully created key; do not mint another key during a configuration retry.

3. Configure the detected application

Prefer the existing client and dependency versions. Make the smallest change that preserves the application's current provider abstraction.

Pydantic AI

Use the Gateway model form when the selected provider and model are known:

python
from pydantic_ai import Agent

# Set PYDANTIC_AI_GATEWAY_API_KEY and PYDANTIC_AI_GATEWAY_BASE_URL from Connect.
agent = Agent('gateway/openai:gpt-5.2')

Set PYDANTIC_AI_GATEWAY_BASE_URL to the Gateway root URL supplied by Connect for the selected region or self-hosted deployment, alongside the API key. Use the Pydantic AI snippet's root URL, not a provider-specific endpoint copied from another client's snippet. Preserve an explicitly configured matching URL; do not rely on SDK region inference or a default to select the user's destination.

The normal credential is PYDANTIC_AI_GATEWAY_API_KEY. When the application needs an explicit key or custom route, use the installed Pydantic AI version's gateway_provider() and preserve the provider type and route from the Connect handoff. Do not guess a provider slug from a model name.

OpenAI-compatible clients

Use the exact Gateway base URL and route supplied by Connect, or derive the documented regional route from the handoff and existing provider protocol. Read the provider-specific examples in the Gateway documentation when needed. Preserve the client's existing API shape and load its API key from the application's selected environment variable into the client's API-key option through its normal environment loading mechanism. Do not hard-code a regional URL when the handoff already provides one. A self-hosted origin is not a hosted region: use its confirmed Gateway resource and configured route, or ask for them. A documented provider path alone does not prove that this organization has that route enabled.

Anthropic, Google, and other native clients

Use the provider-specific Gateway snippet from Connect or the linked public Gateway documentation for the selected region. Native provider paths are not interchangeable: Anthropic, OpenAI Responses, Google, Bedrock, and chat-completions routes have different URLs and request shapes. Do not translate a native request into another protocol merely to make the example compile.

4. Verify one real request

Explain that a live request sends its prompt to the selected provider through Gateway and may incur usage charges. Use one small synthetic payload with no application, customer, or secret data. An explicit request to configure and test the selected route authorizes this bounded check; otherwise ask for approval before sending it. Do not activate paid access or run production workloads as a test.

Run that request through the selected route. Check the response and the application's normal error handling. A successful import, configuration parse, or process exit is not proof that the request used the Gateway.

If the project has a read-capable Logfire login, query the exact project for a fresh Gateway request or open its Gateway activity view. Do not use the send-only SDK write token for reads. If read verification is unavailable, report the request response as verified and mark Logfire-side arrival as unverified.

Run the project's formatter, type checker, build, and focused tests. Report the exact provider, route, model, endpoint class, credential variable, request result, and any unverified Logfire-side check. Never claim that a Gateway request was observed when this session did not check it.

After setup, return the relevant project or Gateway view link. If provider activation or another prerequisite prevents the request, report that blocker and mark application inference as unverified.

References

Heefeg gestallte Froen

Wat mécht de KI-Skill Logfire Gateway?

Configure an application's model calls to use the Pydantic AI Gateway. Use when the user asks to route application inference through Gateway, connect a Gateway key, or add a Gateway provider snippet. This does not configure or instrument coding agents.

Firwat Logfire Gateway op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Logfire Gateway besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Logfire Gateway an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/pydantic/skills/tree/main/plugins/logfire/skills/logfire-gateway an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Logfire Gateway benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Logfire Gateway benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Logfire Gateway domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Logfire Gateway gratis?

Jo. De Skill gëtt vum pydantic ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇