Add NVIDIA NIM platform (provider 11)
The 14th registry row: id "nvidia", NVIDIA_API_KEY > auth.json "nvidia" scope, https://integrate.api.nvidia.com/v1 with KIGI_NVIDIA_BASE_URL override, Bearer, ChatCompletions, enrichment-backed metadata (models_dev_id nvidia — the quirk matrix's earlier 'absent' claim was wrong; models.dev has 84 nvidia models), restrict_to_enriched=true (the NIM listing mixes chat/embedding/rerank/vision/image; keep the 45 tool-calling chat models). Slashed org/model ids (nvidia/meta/llama-3.3-70b-instruct) round-trip via the first-slash split; the native id rides the wire. NIM exposes raw vLLM behavior and stream_options support varies per model (some strict vLLM backends 4xx on it), so chat_compat=StrictOpenAi strips stream_options — streaming works across the whole fleet, usage falls back to estimation. Snapshot reasoning models carry no effort menus, so kigi sends no reasoning_effort (which an unsupported strict validator would 400 on). Review: no defects. Logged note: a key lacking the org 'Public API Endpoints' permission passes /models validation but 403s on chat (user-fixable edge case).
This commit is contained in:
@@ -6894,7 +6894,7 @@ pub(crate) mod tests {
|
||||
#[test]
|
||||
fn pending_menu_items_lists_interactive_methods_plus_quit() {
|
||||
let items = pending_menu_items(&fresh_user_auth_methods(), None);
|
||||
assert_eq!(items.len(), 14, "13 login rows + Quit, got {items:?}");
|
||||
assert_eq!(items.len(), 15, "14 login rows + Quit, got {items:?}");
|
||||
assert!(
|
||||
matches!(&items[0], PendingMenuItem::Login { label } if label == "Kimi Code (OAuth)"),
|
||||
"row 0 must be the OAuth login, got {:?}",
|
||||
@@ -6985,7 +6985,14 @@ pub(crate) mod tests {
|
||||
label: "Cerebras (API key)".into(),
|
||||
}
|
||||
);
|
||||
assert_eq!(items[13], PendingMenuItem::Quit);
|
||||
assert_eq!(
|
||||
items[13],
|
||||
PendingMenuItem::ApiKey {
|
||||
target: PlatformLogin(kigi_shell::models::PlatformId::Nvidia),
|
||||
label: "NVIDIA NIM (API key)".into(),
|
||||
}
|
||||
);
|
||||
assert_eq!(items[14], PendingMenuItem::Quit);
|
||||
// The non-interactive methods must never appear as rows.
|
||||
let byok = kigi_shell::agent::auth_method::build_auth_methods(
|
||||
kigi_shell::agent::auth_method::AuthMethodsBuildInputs {
|
||||
@@ -6996,7 +7003,7 @@ pub(crate) mod tests {
|
||||
);
|
||||
assert_eq!(
|
||||
pending_menu_items(&byok.methods, None).len(),
|
||||
14,
|
||||
15,
|
||||
"xai.api_key / cached_token must not add rows"
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user