assistant: Make it easier to define custom models (#15442)
This PR makes it easier to specify custom models for the Google, OpenAI,
and Anthropic provider:
Before (google):
```json
{
"language_models": {
"google": {
"available_models": [
{
"custom": {
"name": "my-custom-google-model",
"max_tokens": 12345
}
}
]
}
}
}
```
After (google):
```json
{
"language_models": {
"google": {
"available_models": [
{
"name": "my-custom-google-model",
"max_tokens": 12345
}
]
}
}
}
```
Before (anthropic):
```json
{
"language_models": {
"anthropic": {
"available_models": [
{
"custom": {
"name": "my-custom-anthropic-model",
"max_tokens": 12345
}
}
]
}
}
}
```
After (anthropic):
```json
{
"language_models": {
"anthropic": {
"version": "1",
"available_models": [
{
"name": "my-custom-anthropic-model",
"max_tokens": 12345
}
]
}
}
}
```
The settings will be auto-upgraded so the old versions will continue to
work (except for Google since that one has not been released).
/cc @as-cii
Release Notes:
- N/A
---------
Co-authored-by: Thorsten <thorsten@zed.dev>