Skip to main content

Working with Vendors

Vendors represent third-party AI providers and services that you integrate with in Credo AI.

Overview​

Vendors in Credo AI represent external AI service providers, such as OpenAI, Anthropic, Google AI, or any other third-party AI/ML service your organization uses. Tracking vendors helps you maintain governance over external AI dependencies.

Listing Vendors​

from credoai import CredoAI

client = CredoAI()

response = client.vendors.list(page_limit=50)
for vendor in response.items:
print(f"{vendor.name} (ID: {vendor.id})")

Creating a Vendor​

from credoai import CredoAI, VendorCreate

client = CredoAI()

vendor = client.vendors.create(
data=VendorCreate(
name="OpenAI",
description="GPT models and embeddings API",
)
)
print(f"Created: {vendor.id}")

Getting a Vendor​

vendor = client.vendors.get(vendor_id="vendor_def456")
print(f"Name: {vendor.name}")

Updating a Vendor​

from credoai import VendorUpdate

updated = client.vendors.update(
vendor_id="vendor_def456",
data=VendorUpdate(description="Updated description"),
)

Deleting a Vendor​

client.vendors.delete(vendor_id="vendor_def456")

Managing Relationships​

Vendors can be linked to use cases and models:

from credoai import RelationshipAdd

# Add a vendor to a use case
client.use_case_vendors.add(
use_case_id="uc_abc123",
data=RelationshipAdd(id="vendor_def456"),
)

# List vendors for a use case
vendors = client.use_case_vendors.list(use_case_id="uc_abc123")

# Add a vendor to a model
client.model_vendors.add(
model_id="model_xyz789",
data=RelationshipAdd(id="vendor_def456"),
)

Next Steps​