Skip to content

Fix empty custom URL validation in build.gradle.kts#151

Closed
Copilot wants to merge 2 commits into
mainfrom
copilot/check-model-path-tokenizer-path
Closed

Fix empty custom URL validation in build.gradle.kts#151
Copilot wants to merge 2 commits into
mainfrom
copilot/check-model-path-tokenizer-path

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 15, 2026

Custom model/tokenizer URLs passed via gradle properties were not properly validated when empty strings were provided (e.g., -PcustomPteUrl=). The Elvis operator only checks for null, not empty strings.

Changes

  • Replace ?: null check with isNullOrEmpty() to catch both null and empty string cases
  • Add "qwen3" to valid preset options in error message (was missing despite being defined)

Before

pteUrl = customPteUrl ?: throw GradleException("customPteUrl is required...")

After

if (customPteUrl.isNullOrEmpty()) {
    throw GradleException("customPteUrl is required...")
}
pteUrl = customPteUrl
Original prompt

If you look at llm-android.yml and UIWorkflowTest and corresponding build.gradle.kts I still feel like the model path and tokenizer path is not honored. Can you help me check?


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jan 15, 2026
Co-authored-by: kirklandsign <107070759+kirklandsign@users.noreply.github.com>
Copilot AI changed the title [WIP] Check model and tokenizer paths in configuration Fix empty custom URL validation in build.gradle.kts Jan 15, 2026
Copilot AI requested a review from kirklandsign January 15, 2026 08:43
@kirklandsign kirklandsign marked this pull request as ready for review January 15, 2026 18:33
@kirklandsign kirklandsign deleted the copilot/check-model-path-tokenizer-path branch January 15, 2026 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants