project-careti: Command for Claude Code

.agents/commands/api-provider-testing.md

api-provider-testing is a command for Claude Code from caretive-ai/project-careti. It costs 8 tokens per session (654 once invoked), scanned A, original, Apache-2.0.

A set of testing guidelines for adding or changing support for LLM API providers. LLM APIs are services that return text from language models, sometimes in streaming chunks or through tool calls.

In plain words
What is it for?
Use it to test conversations, streamed responses, tool calling, timeout behavior, invalid keys, rate limits, empty responses, and usage reporting.
Why use it?
It helps reveal provider-specific differences in responses, errors, timeouts, tool calls, and token reporting before support is released.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: installed under .agents/ (shared by several agents).

This is caretive-ai/project-careti's own configuration. It tells Claude Code how to work on project-careti itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything project-careti configures →

Reuse

Borrowing it

Nothing to install: this file belongs to caretive-ai/project-careti. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/caretive-ai/project-careti/main/.agents/commands/api-provider-testing.md
Clone the repo
git clone --depth 1 https://github.com/caretive-ai/project-careti

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for api-provider-testing

README.md
[![agentmods](https://agentmods.dev/badge/commands/caretive-ai/project-careti/api-provider-testing.svg)](https://agentmods.dev/commands/caretive-ai/project-careti/api-provider-testing)
Your own site
<a href="https://agentmods.dev/commands/caretive-ai/project-careti/api-provider-testing"><img src="https://agentmods.dev/badge/commands/caretive-ai/project-careti/api-provider-testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 654 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00008 $0.00654
Opus 5 $0.00004 $0.00327
Sonnet 5 $0.00002 $0.00131
Haiku 4.5 $0.00001 $0.00065

Measured 7d ago against content hash c264db85ead3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

api-provider-testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/commands/api-provider-testing.md · 94 lines

How it starts

The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.

API Provider Testing

Guidelines for testing LLM API providers when adding or modifying support in Caret.

Test Categories

1. Basic Conversation Test

  • Simple prompt → response verification
  • Streaming chunk reception
  • Token usage reporting

2. Tool Calling Test

Core verification for agentic capabilities.

Test Flow:

  1. Send message with tool definitions
  2. Verify tool_calls chunk received
  3. Verify function name and arguments
  4. Send tool result back
  5. Verify final text response

Provider-Specific Formats:

Provider Tool Call Key Arguments Tool Result Key
OpenAI tool_calls string tool_call_id
Naver Cloud toolCalls object toolCallId
Upstage tool_calls string tool_call_id
Gemini functionCall object n/a

3. Timeout Test

  • Use AbortController with configurable timeout
  • Default: 60 seconds recommended
  • Verify timeout error is thrown correctly

4. Error Handling Test

  • Invalid API key → 401/403 error
  • Rate limiting → 429 error with retry
  • Empty response → specific error message

Test Script Template

Location: scripts/test-{provider}-api.js

async function testBasicConversation() { ... }
async function testToolCalling() { ... }
async function testToolResultFlow() { ... }
async function testTimeout() { ... }

async function main() {
  const results = {
    basic: await testBasicConversation(),
    toolCall: await testToolCalling(),
    toolFlow: await testToolResultFlow(),
  }
  console.log('Results:', results)
}

Existing Test Scripts

Script Provider Tests
scripts/test-naver-cloud-api.js Naver Cloud Basic, Timeout
scripts/test-naver-tool-calling.js Naver Cloud Tool calling
scripts/test-upstage-api.js Upstage Basic, Streaming
scripts/test-glm47-streaming.js GLM4.7 Thinking, Streaming

Key Files

File Purpose
src/core/api/providers/{provider}.ts Provider handler
src/core/api/transform/tool-call-processor.ts Tool call parsing
src/core/api/transform/stream.ts Stream types
src/core/api/retry.ts Retry decorator

Read the full file on GitHub · 94 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 94 lines · 8 tokens per session scan A c264db85ead3

Subscribe to this mod's changes

api-provider-testing is a command published in the GitHub repository caretive-ai/project-careti (47 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 8 tokens to every session and 654 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.