Merge Modelfamily into modelinfo (#8763)

- Merge ModelFamily into ModelInfo
- Remove logic for adding instructions to apply patch
- Add compaction limit and visible context window to `ModelInfo`
This commit is contained in:
Ahmed Ibrahim
2026-01-07 10:35:09 -08:00
committed by GitHub
parent a1e81180f8
commit 9179c9deac
28 changed files with 964 additions and 777 deletions

View File

@@ -68,11 +68,11 @@ async fn responses_stream_includes_subagent_header_on_review() {
let conversation_id = ThreadId::new();
let auth_mode = AuthMode::ChatGPT;
let session_source = SessionSource::SubAgent(SubAgentSource::Review);
let model_family = ModelsManager::construct_model_family_offline(model.as_str(), &config);
let model_info = ModelsManager::construct_model_info_offline(model.as_str(), &config);
let otel_manager = OtelManager::new(
conversation_id,
model.as_str(),
model_family.slug.as_str(),
model_info.slug.as_str(),
None,
Some("test@test.com".to_string()),
Some(auth_mode),
@@ -84,7 +84,7 @@ async fn responses_stream_includes_subagent_header_on_review() {
let client = ModelClient::new(
Arc::clone(&config),
None,
model_family,
model_info,
otel_manager,
provider,
effort,
@@ -162,12 +162,12 @@ async fn responses_stream_includes_subagent_header_on_other() {
let conversation_id = ThreadId::new();
let auth_mode = AuthMode::ChatGPT;
let session_source = SessionSource::SubAgent(SubAgentSource::Other("my-task".to_string()));
let model_family = ModelsManager::construct_model_family_offline(model.as_str(), &config);
let model_info = ModelsManager::construct_model_info_offline(model.as_str(), &config);
let otel_manager = OtelManager::new(
conversation_id,
model.as_str(),
model_family.slug.as_str(),
model_info.slug.as_str(),
None,
Some("test@test.com".to_string()),
Some(auth_mode),
@@ -179,7 +179,7 @@ async fn responses_stream_includes_subagent_header_on_other() {
let client = ModelClient::new(
Arc::clone(&config),
None,
model_family,
model_info,
otel_manager,
provider,
effort,
@@ -212,7 +212,7 @@ async fn responses_stream_includes_subagent_header_on_other() {
}
#[tokio::test]
async fn responses_respects_model_family_overrides_from_config() {
async fn responses_respects_model_info_overrides_from_config() {
core_test_support::skip_if_no_network!();
let server = responses::start_mock_server().await;
@@ -256,11 +256,11 @@ async fn responses_respects_model_family_overrides_from_config() {
AuthManager::from_auth_for_testing(CodexAuth::from_api_key("Test API Key")).get_auth_mode();
let session_source =
SessionSource::SubAgent(SubAgentSource::Other("override-check".to_string()));
let model_family = ModelsManager::construct_model_family_offline(model.as_str(), &config);
let model_info = ModelsManager::construct_model_info_offline(model.as_str(), &config);
let otel_manager = OtelManager::new(
conversation_id,
model.as_str(),
model_family.slug.as_str(),
model_info.slug.as_str(),
None,
Some("test@test.com".to_string()),
auth_mode,
@@ -272,7 +272,7 @@ async fn responses_respects_model_family_overrides_from_config() {
let client = ModelClient::new(
Arc::clone(&config),
None,
model_family,
model_info,
otel_manager,
provider,
effort,