Skip to content

refactor(vertexai): remove decommisioned generativeaionvertexai_gemini_token_count_advanced region tag#10298

Closed
Kef131 wants to merge 3 commits into
mainfrom
refactor(vertexai)-remove-deprecated-tokencountadvanced-tag
Closed

refactor(vertexai): remove decommisioned generativeaionvertexai_gemini_token_count_advanced region tag#10298
Kef131 wants to merge 3 commits into
mainfrom
refactor(vertexai)-remove-deprecated-tokencountadvanced-tag

Conversation

@Kef131

@Kef131 Kef131 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes #
b/530681617

Region tag generativeaionvertexai_gemini_token_count_advanced shows no reference in devsite

Checklist

Testing

  • I have tested this change on a live environment and verified it works as intended.
  • Tests pass: mvn clean verify required
  • Lint passes: mvn -P lint checkstyle:check required
  • Static Analysis: mvn -P lint clean compile pmd:cpd-check spotbugs:check advisory only

Compliance & Style

  • I have followed Sample Format Guide
  • pom.xml parent set to latest shared-configuration
  • Appropriate changes to README are included in PR
  • This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
  • This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample

Post-Approval Actions

  • Please merge this PR for me once it is approved

@product-auto-label product-auto-label Bot added the samples Issues that are directly related to samples. label Jul 3, 2026

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

Copy link
Copy Markdown
Contributor

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 removes documentation region tags from several Java snippet files. While decommissioning the token count snippet is expected, the reviewer notes that active region tags in QuestionAnswer.java and TextInput.java were accidentally removed as well. Restoring these tags is necessary to prevent breaking the associated public documentation pages.

package vertexai.gemini;

// [START generativeaionvertexai_non_stream_text_basic]
import com.google.cloud.vertexai.VertexAI;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

It appears that the region tag generativeaionvertexai_non_stream_text_basic was accidentally removed. The PR description only mentions decommissioning generativeaionvertexai_gemini_token_count_advanced. Removing this active region tag will break the Java code snippet on the public documentation page 'Generate Text With a Generative Model'. Please restore this tag.

Suggested change
import com.google.cloud.vertexai.VertexAI;
// [START generativeaionvertexai_non_stream_text_basic]
import com.google.cloud.vertexai.VertexAI;

}
}
// [END generativeaionvertexai_non_stream_text_basic]
} No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

Please restore the corresponding [END ...] region tag to avoid breaking the documentation page.

Suggested change
}
}
// [END generativeaionvertexai_non_stream_text_basic]

package vertexai.gemini;

// [START generativeaionvertexai_gemini_generate_from_text_input]
import com.google.cloud.vertexai.VertexAI;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

It appears that the region tag generativeaionvertexai_gemini_generate_from_text_input was accidentally removed. The PR description only mentions decommissioning generativeaionvertexai_gemini_token_count_advanced. Removing this active region tag will break the Java code snippet on the public documentation page 'Generate text from text-only input'. Please restore this tag.

Suggested change
import com.google.cloud.vertexai.VertexAI;
// [START generativeaionvertexai_gemini_generate_from_text_input]
import com.google.cloud.vertexai.VertexAI;

}
}
// [END generativeaionvertexai_gemini_generate_from_text_input]
} No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

Please restore the corresponding [END ...] region tag to avoid breaking the documentation page.

Suggested change
}
}
// [END generativeaionvertexai_gemini_generate_from_text_input]

@Kef131 Kef131 closed this Jul 3, 2026
@Kef131 Kef131 deleted the refactor(vertexai)-remove-deprecated-tokencountadvanced-tag branch July 3, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant