Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions crates/adapter-zarvis/src/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,7 @@ impl ResolvedModel {
provider::routing::Provider::OpenAI => "openai",
provider::routing::Provider::Anthropic => "anthropic",
provider::routing::Provider::Ollama => "ollama",
provider::routing::Provider::CodexOauth => "codex-oauth",
}
}
}
Expand Down Expand Up @@ -733,6 +734,9 @@ pub fn resolve_model_from_spec(spec_str: &str) -> Result<ResolvedModel> {
Box::new(provider::anthropic::Anthropic::from_env()?)
}
provider::routing::Provider::Ollama => Box::new(provider::ollama::Ollama::from_env()?),
provider::routing::Provider::CodexOauth => {
Box::new(provider::codex_oauth::CodexOauth::from_env()?)
}
};
Ok(ResolvedModel {
model: spec.model,
Expand Down
7 changes: 7 additions & 0 deletions crates/adapter-zarvis/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ pub fn context_window_tokens(provider: &str, model: &str) -> usize {
("openai", _) => 32_000,
("anthropic", _) => 200_000,
("ollama", _) => 8_000,
// ChatGPT-subscription Codex backend. Same gpt-5* family,
// same advertised context window as the platform API — the
// billing pipe is what differs, not the model. Starting
// value; the runtime overflow-learn path in `model_limits.rs`
// will tighten if the subscription tier enforces something
// lower in practice.
("codex-oauth", _) => 400_000,
_ => 8_000,
}
}
Expand Down
Loading
Loading