Setup & configuration
This guide covers all technical details for setting up and configuring LLM providers, including permissions, changing defaults, validation flow, and troubleshooting common issues.
Permissions & access control
Managing LLM provider settings requires organization administrator permissions. Only admins can modify default providers or add new provider configurations.
- Admin Users
- Organization Members
Administrators can perform all LLM provider management operations:
Configuration Operations
- Get default LLM provider and model - View current default provider settings
- Change default LLM provider and model - Update organization default providers
- Create or connect an LLM provider - Create and configure new LLM provider connections
- Get a specific provider configuration - View existing provider configurations
- Delete a specific provider configuration - Delete provider configurations
Management Capabilities
- Set organization-wide default providers and models
- Configure provider-specific settings and credentials
- Manage provider access and permissions
- Test provider connections with validation
Organization members have read-only access to LLM provider information:
Read-Only Operations
- Get default LLM provider and model - View current default provider settings
- Get configured LLM providers - View available providers and their status
- See which models are currently configured as defaults
No Management Access
- Cannot modify provider configurations
- Cannot change default settings
- Cannot add or remove providers
Prerequisites
Before configuring LLM providers, ensure you have:
- Access to Port AI: Your organization has access to the Port AI features.
- Provider Accounts: Active accounts with the LLM providers you want to use
- Admin Permissions: Organization administrator role in Port
Some providers require additional setup before you can configure them in Port. See Step 1: Configure provider policies and settings for provider-specific configuration instructions.
Step 1: Configure provider policies and settings (optional)
Some providers require additional setup before you can register them in Port.
- AWS Bedrock: Requires IAM policy and authentication configuration. See the AWS Bedrock setup guide for the full walkthrough.
- OpenAI compatible: You need a reachable base URL for your server (or gateway) and the model names it exposes, plus a Port secret for the key or the values you will send in custom headers. See the OpenAI compatible setup guide (LiteLLM example), then continue with Step 2: store API keys in secrets and Step 3: configure LLM providers.
- OpenAI, Anthropic, Azure OpenAI, Azure Anthropic: No additional setup required. Skip to Step 2: store API keys in secrets.
Step 2: Store API keys in secrets
Before configuring providers, store your API keys in Port's secrets system. The secret names you choose are flexible - you'll reference them in your provider configuration.
After creating a secret, you will be able to view its value only once. Afterwards, you will be able to delete the secret or edit its value, but not to view it.
- Open the Credentials modal.
- Click on the
Secretstab. - Click on
+ Secretand add the required secrets for your chosen provider(s):
- OpenAI
- Anthropic
- Azure OpenAI
- Azure Anthropic
- AWS Bedrock
- OpenAI compatible
Required Secret:
- API Key secret (e.g.,
openai-api-key) - Your OpenAI API key
Required Secret:
- API Key secret (e.g.,
anthropic-api-key) - Your Anthropic API key
Required Secret:
- API Key secret (e.g.,
azure-openai-api-key) - Your Azure OpenAI API key
Required Secret:
- API Key secret (e.g.,
azure-anthropic-api-key) - Your Azure Anthropic API key
Option 1: Using access keys (required if not using assume role)
- Access Key ID secret (e.g.,
aws-bedrock-access-key-id) - Your AWS access key ID - Secret Access Key secret (e.g.,
aws-bedrock-secret-access-key) - Your AWS secret access key
Option 2: Using assume role (alternative to access keys)
- External ID secret (e.g.,
BEDROCK_ROLE_EXTERNAL_ID) - Optional external ID for the trust relationship
See the AWS Bedrock configuration section in Step 1 for configuration details.
We document a LiteLLM-based path in the OpenAI compatible setup guide.
Typical secret
- API key secret (e.g.,
LITELLM_API_KEY) - Store the API key the proxy validates, unless you use only custom headers for auth.
Before you call the API
- Confirm the base URL (including a
/v1prefix if your gateway uses the OpenAI layout) is reachable from Port. - Register at least one model
name(three or more characters) that your server exposes, matching what you will send asmodelin invocations.
You can choose any names for your secrets. The examples above are suggestions - use names that make sense for your organization. You will reference these exact names in your provider configuration.
For more details on managing secrets, see the Port Secrets documentation.
Step 3: Configure LLM providers
Use the Create or connect an LLM provider API to configure your providers. The interactive API reference provides detailed examples and allows you to test the configuration for each provider type (OpenAI, Anthropic, Azure OpenAI, Azure Anthropic, AWS Bedrock, OpenAI compatible).
Once providers are configured, you can view and select default providers and models through the UI (Builder → Organization Settings → AI tab) or continue using the API for all operations.
Model overrides
By default, Port tests all supported models when you register a provider. If your account only has access to a subset of models, the validation will fail for the ones you don't have, and the entire registration will be rejected.
To register a provider with only specific models, use the overrides field to explicitly enable the models you want and disable the rest:
Example: Bedrock with selective model enablement (click to expand)
curl -s -X POST 'https://api.port.io/v1/llm-providers?validate_connection=true' \
-H "Authorization: Bearer $PORT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"provider": "bedrock",
"enabled": true,
"config": {
"roleArn": "arn:aws:iam::<YOUR_ACCOUNT_ID>:role/<YOUR_ROLE_NAME>",
"region": "eu-central-1",
"externalIdSecretName": "BEDROCK_ROLE_EXTERNAL_ID"
},
"overrides": {
"models": {
"claude-haiku-4-5-20251001": {
"enabled": true
},
"claude-sonnet-4-5-20250929": {
"enabled": true
},
"claude-sonnet-4-20250514": {
"enabled": false
},
"claude-opus-4-5-20251101": {
"enabled": false
},
"claude-opus-4-6": {
"enabled": false
}
}
}
}'
Setting only the models you want to enabled: true is not enough. Models you don't have access to must be explicitly set to enabled: false, otherwise Port will still attempt to validate them and the registration will fail.
Step 4: Validate configuration
Test your provider configuration with connection validation using the Create or connect an LLM provider API with the validate_connection=true parameter. The interactive API reference shows how to test your configuration before saving it.
Getting your current configuration
You can view your organization's current LLM provider defaults through the UI or API:
Using the UI:
- Go to Builder → Organization Settings → AI tab.
- View all configured providers and models.
- See which provider and model are currently set as defaults.
Using the API: Retrieve your organization's current LLM provider defaults using the Get default LLM provider and model API. The interactive API reference shows the response format and allows you to test the endpoint.
System defaults
When no organization-specific defaults are configured, Port uses these system defaults:
- Default Provider:
port - Default Model:
claude-sonnet-4-5-20250929
Changing default providers
You can change your organization's default LLM provider and model through the UI or API:
Using the UI:
- Go to Builder → Organization Settings → AI tab.
- Select your preferred Default LLM provider from the dropdown.
- Select your preferred Default model from the dropdown.
- Click Save to apply your changes.
To add a new custom LLM provider, you still need to use the Create or connect an LLM provider API. Once a provider is configured, it will appear in the UI dropdown for selection.
Using the API: Update your organization's default LLM provider and model using the Change default LLM provider and model API. The interactive API reference provides the request format and response examples.
Validation flow
The system validates provider configurations to ensure they work correctly before saving. This includes checking credentials, testing connections, and verifying model availability.
For detailed information about how validation works during API requests, see Selecting LLM Provider.
Configuration hierarchy
LLM provider settings follow a hierarchy from organization defaults to system defaults.
For detailed information about how defaults are selected during API requests, see Selecting LLM Provider.