{
  "description": "AIService is a Kubernetes-like Service to interact with a text-based LLM provider. It defines the parameters and credentials required to interact with various LLM providers.",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
      "type": [
        "string",
        "null"
      ]
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": [
        "string",
        "null"
      ]
    },
    "metadata": {
      "type": [
        "object",
        "null"
      ]
    },
    "spec": {
      "additionalProperties": false,
      "description": "The desired behavior of this AIService.",
      "properties": {
        "anthropic": {
          "additionalProperties": false,
          "description": "Anthropic configures Anthropic backend.",
          "properties": {
            "model": {
              "type": [
                "string",
                "null"
              ]
            },
            "params": {
              "additionalProperties": false,
              "description": "Params holds the LLM hyperparameters.",
              "properties": {
                "frequencyPenalty": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "maxTokens": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "presencePenalty": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "temperature": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "topP": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "token": {
              "additionalProperties": false,
              "description": "SecretReference references a kubernetes secret.",
              "properties": {
                "secretName": {
                  "maxLength": 253,
                  "type": "string"
                }
              },
              "required": [
                "secretName"
              ],
              "type": [
                "object",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "azureOpenai": {
          "additionalProperties": false,
          "description": "AzureOpenAI configures AzureOpenAI.",
          "properties": {
            "apiKeySecret": {
              "additionalProperties": false,
              "description": "SecretReference references a kubernetes secret.",
              "properties": {
                "secretName": {
                  "maxLength": 253,
                  "type": "string"
                }
              },
              "required": [
                "secretName"
              ],
              "type": [
                "object",
                "null"
              ]
            },
            "baseUrl": {
              "type": "string"
            },
            "deploymentName": {
              "type": "string"
            },
            "model": {
              "type": [
                "string",
                "null"
              ]
            },
            "params": {
              "additionalProperties": false,
              "description": "Params holds the LLM hyperparameters.",
              "properties": {
                "frequencyPenalty": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "maxTokens": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "presencePenalty": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "temperature": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "topP": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            }
          },
          "required": [
            "baseUrl",
            "deploymentName"
          ],
          "type": [
            "object",
            "null"
          ]
        },
        "bedrock": {
          "additionalProperties": false,
          "description": "Bedrock configures Bedrock backend.",
          "properties": {
            "model": {
              "type": [
                "string",
                "null"
              ]
            },
            "params": {
              "additionalProperties": false,
              "description": "Params holds the LLM hyperparameters.",
              "properties": {
                "frequencyPenalty": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "maxTokens": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "presencePenalty": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "temperature": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "topP": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "region": {
              "type": [
                "string",
                "null"
              ]
            },
            "systemMessage": {
              "type": [
                "boolean",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "cohere": {
          "additionalProperties": false,
          "description": "Cohere configures Cohere backend.",
          "properties": {
            "model": {
              "type": [
                "string",
                "null"
              ]
            },
            "params": {
              "additionalProperties": false,
              "description": "Params holds the LLM hyperparameters.",
              "properties": {
                "frequencyPenalty": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "maxTokens": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "presencePenalty": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "temperature": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "topP": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "token": {
              "additionalProperties": false,
              "description": "SecretReference references a kubernetes secret.",
              "properties": {
                "secretName": {
                  "maxLength": 253,
                  "type": "string"
                }
              },
              "required": [
                "secretName"
              ],
              "type": [
                "object",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "deepSeek": {
          "additionalProperties": false,
          "description": "DeepSeek configures DeepSeek.",
          "properties": {
            "baseUrl": {
              "type": [
                "string",
                "null"
              ]
            },
            "model": {
              "type": [
                "string",
                "null"
              ]
            },
            "params": {
              "additionalProperties": false,
              "description": "Params holds the LLM hyperparameters.",
              "properties": {
                "frequencyPenalty": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "maxTokens": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "presencePenalty": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "temperature": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "topP": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "token": {
              "additionalProperties": false,
              "description": "SecretReference references a kubernetes secret.",
              "properties": {
                "secretName": {
                  "maxLength": 253,
                  "type": "string"
                }
              },
              "required": [
                "secretName"
              ],
              "type": [
                "object",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "gemini": {
          "additionalProperties": false,
          "description": "Gemini configures Gemini backend.",
          "properties": {
            "apiKey": {
              "additionalProperties": false,
              "description": "SecretReference references a kubernetes secret.",
              "properties": {
                "secretName": {
                  "maxLength": 253,
                  "type": "string"
                }
              },
              "required": [
                "secretName"
              ],
              "type": [
                "object",
                "null"
              ]
            },
            "model": {
              "type": [
                "string",
                "null"
              ]
            },
            "params": {
              "additionalProperties": false,
              "description": "Params holds the LLM hyperparameters.",
              "properties": {
                "frequencyPenalty": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "maxTokens": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "presencePenalty": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "temperature": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "topP": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "mistral": {
          "additionalProperties": false,
          "description": "Mistral configures Mistral AI backend.",
          "properties": {
            "apiKey": {
              "additionalProperties": false,
              "description": "SecretReference references a kubernetes secret.",
              "properties": {
                "secretName": {
                  "maxLength": 253,
                  "type": "string"
                }
              },
              "required": [
                "secretName"
              ],
              "type": [
                "object",
                "null"
              ]
            },
            "model": {
              "type": [
                "string",
                "null"
              ]
            },
            "params": {
              "additionalProperties": false,
              "description": "Params holds the LLM hyperparameters.",
              "properties": {
                "frequencyPenalty": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "maxTokens": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "presencePenalty": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "temperature": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "topP": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "ollama": {
          "additionalProperties": false,
          "description": "Ollama configures Ollama backend.",
          "properties": {
            "baseUrl": {
              "type": "string"
            },
            "model": {
              "type": [
                "string",
                "null"
              ]
            },
            "params": {
              "additionalProperties": false,
              "description": "Params holds the LLM hyperparameters.",
              "properties": {
                "frequencyPenalty": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "maxTokens": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "presencePenalty": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "temperature": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "topP": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            }
          },
          "required": [
            "baseUrl"
          ],
          "type": [
            "object",
            "null"
          ]
        },
        "openai": {
          "additionalProperties": false,
          "description": "OpenAI configures OpenAI.",
          "properties": {
            "baseUrl": {
              "type": [
                "string",
                "null"
              ]
            },
            "model": {
              "type": [
                "string",
                "null"
              ]
            },
            "params": {
              "additionalProperties": false,
              "description": "Params holds the LLM hyperparameters.",
              "properties": {
                "frequencyPenalty": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "maxTokens": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "presencePenalty": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "temperature": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "topP": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "token": {
              "additionalProperties": false,
              "description": "SecretReference references a kubernetes secret.",
              "properties": {
                "secretName": {
                  "maxLength": 253,
                  "type": "string"
                }
              },
              "required": [
                "secretName"
              ],
              "type": [
                "object",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "qWen": {
          "additionalProperties": false,
          "description": "QWen configures QWen.",
          "properties": {
            "baseUrl": {
              "type": [
                "string",
                "null"
              ]
            },
            "model": {
              "type": [
                "string",
                "null"
              ]
            },
            "params": {
              "additionalProperties": false,
              "description": "Params holds the LLM hyperparameters.",
              "properties": {
                "frequencyPenalty": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "maxTokens": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "presencePenalty": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "temperature": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "topP": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "token": {
              "additionalProperties": false,
              "description": "SecretReference references a kubernetes secret.",
              "properties": {
                "secretName": {
                  "maxLength": 253,
                  "type": "string"
                }
              },
              "required": [
                "secretName"
              ],
              "type": [
                "object",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        }
      },
      "type": [
        "object",
        "null"
      ]
    }
  },
  "type": "object"
}