The Models section is the workspace's registry of LLM endpoints. A model endpoint binds a provider, an API key, and (optionally) a custom base URL and model name. Crew Agents and the Inference block both pick from this list.
What a model endpoint stores
The workspace_model_endpoints table has these columns:
| Column | Required | Notes |
|---|---|---|
providerId | Yes | Built-in provider id (openai, anthropic, google, xai, deepseek, …) or a custom provider type. |
encryptedApiKey | Yes | Encrypted at rest. The plaintext key is only re-derived when an Agent or Inference run resolves the endpoint. |
providerType | Optional | Override the provider class — useful when baseUrl points at an OpenAI-compatible gateway. |
baseUrl | Optional | Custom base URL. Leave empty to use the provider default. |
modelName | Optional | Specific model id (e.g. gpt-4o, claude-sonnet-4-6, or a self-hosted model name). |
Each (workspaceId, providerId) pair is unique — one endpoint per provider per workspace.
How endpoints are consumed
Model dropdowns in the Inference block and Agents load from GET /api/workspaces/:workspaceId/model-endpoints and store the endpoint ID, not the model name. The endpoint is resolved at execution time:
- The handler reads the endpoint row.
- The provider, decrypted API key, base URL, and model name are passed to the provider request.
- If the endpoint omits
modelNameand the provider needs one, the handler falls back to the model id passed in.
You can also pass a known model id directly (e.g. gpt-4o) without a registered endpoint. The handler then uses workspace-default credentials. See executor/handlers/inference/inference-handler.ts:174 for the resolution flow.
An endpoint whose API key has been rotated remotely will fail at run time, not at save time. There is no proactive validation on save — the first run after a key change surfaces the problem.
Source
apps/actana/app/workspace/[workspaceId]/w/crew/models/— UIapps/actana/app/api/workspaces/[workspaceId]/model-endpoints/— APIapps/actana/lib/api-key/model-endpoints.ts—getModelEndpointById,getApiKeyWithModelEndpointpackages/db/schema.ts—workspace_model_endpoints