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> B
Bennet Bo Fenner committed
2ada2964c50deab343b1bdffea9bee28663ac0b5
Parent: 13dcb42
Committed by GitHub <noreply@github.com>
on 7/30/2024, 1:46:39 PM