# ModelClass

> ModelClass is a model a tenant runs on with its own provider key (BYO).

Source: https://docs.go-lumen.ai/he/reference/resources/modelclass

## At a glance

| מאפיין | ערך |
| --- | --- |
| **apiVersion** | `lumen.ai/v1alpha1` |
| **kind** | `ModelClass` |
| **Resource name** | `modelclasses` |
| **Scope** | Namespaced (lives in a workspace's namespace) |

## Description

ModelClass is a model a tenant runs on with its own provider key (BYO).

## Spec

Fields under `spec:`. Nested fields are indented under their parent.

| Field | סוג | ברירת מחדל | תיאור |
| --- | --- | --- | --- |
| `credentialsRef` (חובה) | object |  | CredentialsRef is the Secret, in this namespace, holding the provider's secret fields, by the catalog's field ids (apiKey, serviceAccountJSON). Lumen writes it when a person pastes a key; on premises it may be an ExternalSecret's target, fed from the customer's own vault. |
| `credentialsRef.key` | string | `"apiKey"` | Key is the Secret key holding the API key (the apiKey field); a provider's other secret fields are read by their field ids. |
| `credentialsRef.name` (חובה) | string |  | (minLength 1) |
| `model` (חובה) | string |  | Model is the provider's model identifier. (minLength 1) |
| `parameters` | map of string |  | Parameters are the provider's non-secret settings, by the catalog's field ids: an Azure resource name, a Vertex project and location, a Bedrock region, a self-hosted server's base URL. Lumen checks them against the catalog; a class with a wrong one is never Ready. |
| `provider` (חובה) | string |  | TenantModelProvider is a provider a tenant may bring its own key for: an id in Lumen's model provider catalog. The platform narrows these further with its allowed-providers list (the chart's models.allowedProviders); a class naming a provider outside it is never Ready. (one of anthropic, openai, azureopenai, gemini, vertex, bedrock, deepseek, groq, mistral, xai, moonshot, qwen, minimax, nvidia, openrouter, vercel, databricks, cohere, ollama, lemonade) |

## Status

Written by Lumen; do not set it. Only the phase and the conditions are described here.

| Field | סוג | ברירת מחדל | תיאור |
| --- | --- | --- | --- |
| `conditions` | list of object |  |  |
| `conditions[].lastTransitionTime` (חובה) | string |  | lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. |
| `conditions[].message` (חובה) | string |  | message is a human readable message indicating details about the transition. This may be an empty string. (maxLength 32768) |
| `conditions[].observedGeneration` | integer |  | observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions\[x\].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. (minimum 0) |
| `conditions[].reason` (חובה) | string |  | reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. (minLength 1; maxLength 1024; pattern \`^\[A-Za-z\](\[A-Za-z0-9\_,:\]\*\[A-Za-z0-9\_\])?$\`) |
| `conditions[].status` (חובה) | string |  | status of the condition, one of True, False, Unknown. (one of True, False, Unknown) |
| `conditions[].type` (חובה) | string |  | type of condition in CamelCase or in foo.example.com/CamelCase. (maxLength 316; pattern \`^(\[a-z0-9\](\[-a-z0-9\]\*\[a-z0-9\])?(\\.\[a-z0-9\](\[-a-z0-9\]\*\[a-z0-9\])?)\*/)?((\[A-Za-z0-9\]\[-A-Za-z0-9\_.\]\*)?\[A-Za-z0-9\])$\`) |

## kubectl columns

| Column | Type | JSONPath |
| --- | --- | --- |
| Provider | string | `.spec.provider` |
| Model | string | `.spec.model` |
| Ready | string | `.status.conditions[?(@.type=="Ready")].status` |
| Reason | string | `.status.conditions[?(@.type=="Ready")].reason` |
| Age | date | `.metadata.creationTimestamp` |

## Example

```yaml title="modelclass.yaml"
apiVersion: lumen.ai/v1alpha1
kind: ModelClass
metadata:
  name: our-claude
  namespace: tenant-acme
spec:
  provider: anthropic
  model: claude-sonnet-5-5
  credentialsRef:
    name: our-claude-key
```
