anthropic: Add support for Claude 4 (#31203)
This PR adds support for [Claude 4](https://www.anthropic.com/news/claude-4). Release Notes: - Added support for Claude Opus 4 and Claude Sonnet 4. --------- Co-authored-by: Antonio Scandurra <me@as-cii.com> Co-authored-by: Richard Feldman <oss@rtfeldman.com>
This commit is contained in:
parent
dd4e8b9e66
commit
1475ace6f1
4 changed files with 68 additions and 80 deletions
|
@ -16,7 +16,6 @@ use gpui::{AnyElement, AnyView, App, AsyncApp, SharedString, Task, Window};
|
|||
use http_client::http::{HeaderMap, HeaderValue};
|
||||
use icons::IconName;
|
||||
use parking_lot::Mutex;
|
||||
use proto::Plan;
|
||||
use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize, de::DeserializeOwned};
|
||||
use std::fmt;
|
||||
|
@ -48,15 +47,6 @@ pub fn init_settings(cx: &mut App) {
|
|||
registry::init(cx);
|
||||
}
|
||||
|
||||
/// The availability of a [`LanguageModel`].
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
||||
pub enum LanguageModelAvailability {
|
||||
/// The language model is available to the general public.
|
||||
Public,
|
||||
/// The language model is available to users on the indicated plan.
|
||||
RequiresPlan(Plan),
|
||||
}
|
||||
|
||||
/// Configuration for caching language model messages.
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, JsonSchema)]
|
||||
pub struct LanguageModelCacheConfiguration {
|
||||
|
@ -242,11 +232,6 @@ pub trait LanguageModel: Send + Sync {
|
|||
None
|
||||
}
|
||||
|
||||
/// Returns the availability of this language model.
|
||||
fn availability(&self) -> LanguageModelAvailability {
|
||||
LanguageModelAvailability::Public
|
||||
}
|
||||
|
||||
/// Whether this model supports images
|
||||
fn supports_images(&self) -> bool;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue