openai-radar
OpenAI infrastructure FinOps SDK — part of the Hyperscaler Radar suite.
Scan your OpenAI org for assistants, vector stores, fine-tunes, batch jobs, and token usage.
Detect external service relationships in assistant instructions, flag cost anomalies via a findings engine,
and export inventory to CSV or a draw.io architecture diagram — all through a clean Python SDK
that mirrors the openai-agents Runner API.
Install
pip install openai-radar # SDK + CLI + CSV and draw.io export
pip install openai-radar[agents] # + openai-agents integration
pip install openai-radar[all] # everything
Requires Python 3.10+.
CSV and draw.io export are part of the base install — no extras needed, same as
the rest of the Radar suite. The [csv] and [drawio] extras still resolve (as
no-ops) so older pins keep working.
Quick-start
from openai_radar import RadarClient, Runner
# Reads OPENAI_API_KEY from environment
client = RadarClient()
result = Runner.run_sync(client)
print(result.summary())
result.export_csv("./out/")
result.export_drawio("./out/openai_arch.drawio")
With admin key (org-wide visibility)
client = RadarClient(
api_key="sk-proj-...",
admin_key="sk-admin-...", # unlocks cross-project usage data
)
result = Runner.run_sync(client, config)
Scoped to a project
from openai_radar import RadarClient, Runner, RunConfig
client = RadarClient()
config = RunConfig(project_id="proj_xxx", usage_lookback_days=7)
result = Runner.run_sync(client, config)
CLI
# Full scan — findings table to stdout
openai-radar run
# CSVs + draw.io diagram
openai-radar run --csv-dir ./out --drawio-file arch.drawio
# JSON instead of a table
openai-radar run --output json --out-file scan.json
# Admin key for org-wide usage data
openai-radar run --admin-key sk-admin-... --csv-dir ./out
# Findings only
openai-radar findings
# Scope to a project, 7-day lookback
openai-radar run --project proj_xxx --lookback 7
# Print the version
openai-radar version
Flags follow the Radar suite convention: --output/-o selects table or json,
--out-file writes the JSON payload, --csv-dir writes per-resource CSVs.
openai-agents integration
pip install openai-radar[agents]
from openai_radar.agents import build_radar_agent
from agents import Runner
agent = build_radar_agent()
result = Runner.run_sync(agent, "Scan my org and flag any cost anomalies")
print(result.final_output)
Or compose individual Radar tools into your own agent:
from agents import Agent
from openai_radar.agents.tools import scan_assistants, run_findings, export_drawio
agent = Agent(
name="My FinOps Agent",
instructions="...",
tools=[scan_assistants, run_findings, export_drawio],
)
Findings engine
| Rule ID | Severity | Condition |
|---|---|---|
| ASST_001 | LOW | Assistant has zero tools |
| ASST_002 | INFO | Code Interpreter enabled (file storage costs) |
| VS_001 | MEDIUM | Vector store > 5 GB |
| VS_002 | HIGH | Vector store expires within 7 days |
| FT_001 | MEDIUM | Fine-tune job in failed state |
| BATCH_001 | HIGH | Batch job failure rate > 10% |
| USAGE_001 | MEDIUM | Model consumes > 10M tokens in lookback window |
Service relationship detection
AssistantScanner inspects each assistant's instructions field for external service signals
and emits ServiceRelationship objects (visualized as edges in the draw.io diagram):
| Kind | Signals |
|---|---|
| AWS | aws, s3, ec2, lambda, dynamodb, sqs |
| GCP | gcp, bigquery, gcs, google cloud |
| AZURE | azure, blob.core.windows, cosmosdb |
| DATABASE | postgres, mysql, mongo, redis, neon |
| SLACK | slack |
sendgrid, mailgun, smtp |
|
| WEBHOOK | webhook, http:// |
SDK structure
src/openai_radar/
├── client.py # RadarClient (auth, project vs admin key)
├── runner.py # Runner, RunConfig, RunResult
├── findings.py # FindingEngine, Finding, Severity
├── models/base.py # Pydantic v2 models for all resource types
├── scanners/ # One scanner per resource type
├── exporters/ # CSV + draw.io exporters
├── agents/ # openai-agents tools + build_radar_agent()
└── cli.py # openai-radar CLI
Part of the Hyperscaler Radar suite
aws-radar · gcp-radar · azure-radar · oci-radar · openai-radar · datadog-radar · coreweave-radar
Metadata
Release files for openai-radar 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| openai_radar-2.1.0.tar.gz | 22.6 kB | Without provenance | Details for openai_radar-2.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| openai_radar-2.1.0-py3-none-any.whl | Python 3 | none | any | Details for openai_radar-2.1.0-py3-none-any.whl |
Total release size: 54.0 kB
Release files / openai_radar-2.1.0.tar.gz
| Download URL | openai_radar-2.1.0.tar.gz |
|---|---|
| Size | 22.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cf4e7df6f5728ed8598c593c8dd12f9ace8459652738175e8922a615e2f03e2e
|
|
BLAKE2b-256 checksum How to use checksums |
1cfced9cbae423a30c932e485497d8deef9c3b7ff85dc0c84b3079920d6a37e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.13
|
Release files / openai_radar-2.1.0-py3-none-any.whl
| Download URL | openai_radar-2.1.0-py3-none-any.whl |
|---|---|
| Size | 31.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4a865b0e9c0862212f229806286fdac4cbf574ce73dc042da0aee7981de2847e
|
|
BLAKE2b-256 checksum How to use checksums |
e711f385ad4405790089e4f399a4baab8b891f36ba83a4a79d3f26b506bca54d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.13
|
Security for openai-radar 2.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.