@respan/cli 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/setup/index.js +45 -25
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
|
@@ -257,13 +257,19 @@ If a Priority 1 framework is found, use its instrumentation. Do NOT also add Pri
|
|
|
257
257
|
|
|
258
258
|
**Priority 2 — Direct LLM SDKs** (only if no P1 framework covers this provider):
|
|
259
259
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
|
263
|
-
|
|
264
|
-
|
|
|
265
|
-
|
|
|
266
|
-
|
|
|
260
|
+
These are **auto-instrumented** — just \`Respan()\` / \`new Respan()\`, no extra packages needed:
|
|
261
|
+
|
|
262
|
+
| Library | Python package | JS/TS package | Docs |
|
|
263
|
+
|---------|---------------|---------------|------|
|
|
264
|
+
| OpenAI SDK | \`openai\` | \`openai\` | [docs](https://respan.ai/docs/integrations/openai-sdk.md) |
|
|
265
|
+
| Anthropic SDK | \`anthropic\` | \`@anthropic-ai/sdk\` | [docs](https://respan.ai/docs/integrations/anthropic.md) |
|
|
266
|
+
| Azure OpenAI | \`openai\` (azure config) | \`openai\` | [docs](https://respan.ai/docs/integrations/providers/azure.md) |
|
|
267
|
+
| Google Vertex AI | \`google-cloud-aiplatform\` | — | [docs](https://respan.ai/docs/integrations/vertex-ai.md) |
|
|
268
|
+
| AWS Bedrock | \`boto3\` | — | [docs](https://respan.ai/docs/integrations/aws-bedrock.md) |
|
|
269
|
+
| Cohere | \`cohere\` | — | [docs](https://respan.ai/docs/integrations/providers/cohere.md) |
|
|
270
|
+
| Together AI | \`together\` | — | [docs](https://respan.ai/docs/integrations/together-ai.md) |
|
|
271
|
+
|
|
272
|
+
**Note:** LiteLLM in JS uses the OpenAI-compatible API, so the OpenAI auto-instrument covers it. For Python LiteLLM, see [LiteLLM guide](https://respan.ai/docs/integrations/litellm.md). For Google GenAI (\`@google/genai\`), see [Google GenAI guide](https://respan.ai/docs/integrations/google-genai.md).
|
|
267
273
|
|
|
268
274
|
**1c. Read the actual code and understand the workflow:**
|
|
269
275
|
|
|
@@ -348,36 +354,50 @@ Wait for user confirmation before proceeding.
|
|
|
348
354
|
|
|
349
355
|
### 3. Implement
|
|
350
356
|
|
|
351
|
-
**a) Install packages
|
|
357
|
+
**a) Install packages:**
|
|
358
|
+
|
|
359
|
+
For direct LLM SDKs (Priority 2) — just the core SDK:
|
|
360
|
+
\`\`\`bash
|
|
361
|
+
# Python
|
|
362
|
+
pip install respan-ai
|
|
363
|
+
|
|
364
|
+
# TypeScript
|
|
365
|
+
npm install @respan/respan
|
|
366
|
+
\`\`\`
|
|
367
|
+
|
|
368
|
+
For agent frameworks (Priority 1) — also install the instrumentor. Check the docs link in the table above for the exact packages.
|
|
352
369
|
|
|
353
370
|
**b) Add initialization code** — at the top of the entrypoint, before any LLM client is created:
|
|
354
371
|
|
|
355
|
-
|
|
372
|
+
For **direct LLM SDKs** (auto-instrumented):
|
|
373
|
+
\`\`\`python
|
|
374
|
+
# Python
|
|
375
|
+
from respan import Respan
|
|
376
|
+
Respan()
|
|
377
|
+
\`\`\`
|
|
356
378
|
\`\`\`typescript
|
|
379
|
+
// TypeScript
|
|
357
380
|
import { Respan } from "@respan/respan";
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
const respan = new Respan({
|
|
361
|
-
appName: "<project-name>",
|
|
362
|
-
instrumentations: [new OpenAIInstrumentor()],
|
|
363
|
-
});
|
|
381
|
+
const respan = new Respan();
|
|
364
382
|
await respan.initialize();
|
|
365
383
|
\`\`\`
|
|
366
384
|
|
|
367
|
-
|
|
385
|
+
For **agent frameworks** (explicit instrumentor — fetch the docs URL from the table for the exact pattern):
|
|
368
386
|
\`\`\`python
|
|
387
|
+
# Python example (OpenAI Agents)
|
|
369
388
|
from respan import Respan
|
|
370
|
-
from
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
389
|
+
from respan_instrumentation_openai_agents import OpenAIAgentsInstrumentor
|
|
390
|
+
Respan(instrumentations=[OpenAIAgentsInstrumentor()])
|
|
391
|
+
\`\`\`
|
|
392
|
+
\`\`\`typescript
|
|
393
|
+
// TypeScript example (OpenAI Agents)
|
|
394
|
+
import { Respan } from "@respan/respan";
|
|
395
|
+
import { OpenAIAgentsInstrumentor } from "@respan/instrumentation-openai-agents";
|
|
396
|
+
const respan = new Respan({ instrumentations: [new OpenAIAgentsInstrumentor()] });
|
|
397
|
+
await respan.initialize();
|
|
376
398
|
\`\`\`
|
|
377
399
|
|
|
378
|
-
**c) Add workflow wrappers** — if the user
|
|
379
|
-
|
|
380
|
-
For integration-specific init patterns, fetch the docs URL from the table above.
|
|
400
|
+
**c) Add workflow wrappers** — if the user chose structured traces in the plan.
|
|
381
401
|
|
|
382
402
|
### 4. Verify
|
|
383
403
|
|
package/oclif.manifest.json
CHANGED