Skip to content

v6.9.14#486

Merged
luispater merged 8 commits intomainfrom
plus
Apr 4, 2026
Merged

v6.9.14#486
luispater merged 8 commits intomainfrom
plus

Conversation

@luispater
Copy link
Copy Markdown

No description provided.

dinhkarate and others added 8 commits January 29, 2026 13:32
Address two blocking issues from PR review:
- Auth file now named vertex-{prefix}-{project}.json so importing the
  same project with different prefixes no longer overwrites credentials
- Prefix containing "/" is rejected at import time instead of being
  silently ignored at runtime
- Add prefix to in-memory metadata map for consistency

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
feat: 升级反重力 (antigravity) UA 版本为 1.21.9
@luispater luispater merged commit 3882494 into router-for-me:main Apr 4, 2026
2 checks passed
@luispater luispater deleted the plus branch April 4, 2026 03:40
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Antigravity User-Agent version to 1.21.9, adds common development directories to .gitignore, and introduces a prefix flag for Vertex AI credential imports to support model namespacing. A review comment identifies a consistency issue where the prefix is sanitized for the filename but stored in its raw form in the metadata, recommending uniform sanitization.

Comment on lines +66 to +78
prefix = strings.TrimSpace(prefix)
prefix = strings.Trim(prefix, "/")
if prefix != "" && strings.Contains(prefix, "/") {
log.Errorf("vertex-import: prefix must be a single segment (no '/' allowed): %q", prefix)
return
}

// Include prefix in filename so importing the same project with different
// prefixes creates separate credential files instead of overwriting.
baseName := sanitizeFilePart(projectID)
if prefix != "" {
baseName = sanitizeFilePart(prefix) + "-" + baseName
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The prefix is sanitized for the filename but stored unsanitized in the credential storage and metadata. This can lead to inconsistencies, such as a prefix with spaces being stored as-is but appearing with hyphens in the filename. It is recommended to sanitize the prefix before storing it to ensure it is a valid identifier for model namespacing and consistent across the system.

prefix = strings.TrimSpace(prefix)
	prefix = strings.Trim(prefix, "/")
	if prefix != "" {
		if strings.Contains(prefix, "/") {
			log.Errorf("vertex-import: prefix must be a single segment (no '/' allowed): %q", prefix)
			return
		}
		// Sanitize prefix to ensure it's a valid identifier for model namespacing
		prefix = sanitizeFilePart(prefix)
	}

	// Include prefix in filename so importing the same project with different
	// prefixes creates separate credential files instead of overwriting.
	baseName := sanitizeFilePart(projectID)
	if prefix != "" {
		baseName = prefix + "-" + baseName
	}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants