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.
curl -O https://raw.githubusercontent.com/caretive-ai/project-careti/main/.agents/commands/api-provider-testing.mdgit clone --depth 1 https://github.com/caretive-ai/project-caretiWrote 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.
[](https://agentmods.dev/commands/caretive-ai/project-careti/api-provider-testing)<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>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.
| Model | Per session | Once 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 |
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.
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:
- Send message with tool definitions
- Verify
tool_callschunk received - Verify function name and arguments
- Send tool result back
- 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
AbortControllerwith 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 |
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.
- 7d ago First seen · 94 lines · 8 tokens per session scan A c264db85ead3
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.
Other commands, from other repositories
coverage-report
Generate and display test coverage report with analysis and recommendations.
check-go
Run Go code quality checks including formatting, linting, vetting, and tests.
run-tests
Execute tests with appropriate configuration and flags based on project type.
test
A command that helps write tests for code. Tests are checks that verify whether code behaves as expected.
test-plan
Generate a targeted test plan for the current task.
tdd
A command that follows test-driven development (TDD), a method where you write tests before the code they check. It moves through writing a failing test, adding the smallest implementation, and then improving the code.