Skip to content
Closed
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
13 changes: 12 additions & 1 deletion rust/src/providers/v0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl V0Provider {
supports_credits: true,
default_enabled: false,
is_primary: false,
dashboard_url: Some("https://v0.app/chat/settings/billing"),
dashboard_url: Some("https://v0.app/settings/billing"),
status_page_url: Some("https://www.vercel-status.com/"),
tertiary_label_key: None,
},
Expand Down Expand Up @@ -354,6 +354,17 @@ mod tests {
use super::*;
use serde_json::json;

#[test]
fn dashboard_url_matches_upstream_billing_page() {
const BILLING: &str = "https://v0.app/settings/billing";
assert_eq!(V0Provider::new().metadata().dashboard_url, Some(BILLING));
let configured = crate::settings::get_api_key_providers()
.into_iter()
.find(|info| info.id == ProviderId::V0)
.expect("v0 api key config");
assert_eq!(configured.dashboard_url, Some(BILLING));
}

#[test]
fn parses_token_billing_and_rate_limit_without_fabricating_windows() {
let billing = parse_billing(&json!({
Expand Down
2 changes: 1 addition & 1 deletion rust/src/settings/api_keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ pub fn get_api_key_providers() -> Vec<ProviderConfigInfo> {
"Add a v0 Platform API key. An optional scope can use the provider workspace field or V0_SCOPE.",
),
config_file_path: None,
dashboard_url: Some("https://v0.app/chat/settings/billing"),
dashboard_url: Some("https://v0.app/settings/billing"),
},
ProviderConfigInfo {
id: ProviderId::Fireworks,
Expand Down