remove old okta login authentication refresh
This commit is contained in:
@@ -834,10 +834,34 @@ pub struct BedrockModelConfig {
|
||||
#[serde(default)]
|
||||
#[schemars(description = "Whether the model supports image/vision input.")]
|
||||
pub vision_supported: bool,
|
||||
#[serde(default)]
|
||||
pub invocation_model_id: String,
|
||||
#[serde(default)]
|
||||
pub provider_name: String,
|
||||
#[serde(default)]
|
||||
pub response_streaming_supported: Option<bool>,
|
||||
#[serde(default)]
|
||||
pub runtime_supported: Option<bool>,
|
||||
}
|
||||
|
||||
impl settings_value::SettingsValue for BedrockModelConfig {}
|
||||
|
||||
impl Default for BedrockModelConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
enabled: true,
|
||||
access_verified: false,
|
||||
model_id: String::new(),
|
||||
display_name: String::new(),
|
||||
vision_supported: false,
|
||||
invocation_model_id: String::new(),
|
||||
provider_name: String::new(),
|
||||
response_streaming_supported: None,
|
||||
runtime_supported: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn default_context_size() -> u32 {
|
||||
200_000
|
||||
}
|
||||
|
||||
@@ -32,6 +32,22 @@ fn create_test_request_limit_info(
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn legacy_bedrock_model_settings_default_live_capabilities_without_authorization() {
|
||||
let model: BedrockModelConfig = serde_json::from_value(serde_json::json!({
|
||||
"model_id": "future.new-model",
|
||||
"display_name": "Saved model",
|
||||
"enabled": false,
|
||||
"vision_supported": true
|
||||
})).unwrap();
|
||||
assert_eq!(model.invocation_model_id, "");
|
||||
assert_eq!(model.provider_name, "");
|
||||
assert_eq!(model.response_streaming_supported, None);
|
||||
assert_eq!(model.runtime_supported, None);
|
||||
assert!(!model.access_verified);
|
||||
assert!(!model.enabled);
|
||||
}
|
||||
|
||||
fn add_ai_enablement_dependencies_for_test(app: &mut App) {
|
||||
app.add_singleton_model(|_| AuthStateProvider::new_for_test());
|
||||
app.add_singleton_model(UserWorkspaces::default_mock);
|
||||
@@ -446,6 +462,7 @@ fn orchestration_is_enabled_when_ai_is_enabled() {
|
||||
model_id: "test-model".to_string(),
|
||||
display_name: "Test model".to_string(),
|
||||
vision_supported: false,
|
||||
..Default::default()
|
||||
}],
|
||||
ctx,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user