Skip to content

fix(model): drop non-string tags from modelSearch response#77

Merged
Ryank90 merged 1 commit into
mainfrom
fix/model-search-non-string-tag
Jun 25, 2026
Merged

fix(model): drop non-string tags from modelSearch response#77
Ryank90 merged 1 commit into
mainfrom
fix/model-search-non-string-tag

Conversation

@danmrichards

Copy link
Copy Markdown
Collaborator

Numeric IDs appear in the tags array when a server-side join fails. These are internal artefacts — silently skip them rather than failing to unmarshal the response.

Numeric IDs appear in the tags array when a server-side join fails.
These are internal artefacts — silently skip them rather than
failing to unmarshal the response.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@danmrichards danmrichards requested a review from Copilot June 25, 2026 15:53
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. To trigger a review, include coderabbit-review in the PR description. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b661778b-b36d-4c48-b85d-c35dcbb3edf0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch fix/model-search-non-string-tag

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to make modelSearch response decoding resilient to server-side data issues where the tags array may contain non-string elements (e.g., numeric IDs), by dropping those elements instead of failing JSON unmarshalling.

Changes:

  • Introduces a ModelTags helper type with custom JSON unmarshalling that filters out non-string values.
  • Updates ModelResult.Tags to use the new decoding behavior (currently via a type change).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/api/types.go

@Ryank90 Ryank90 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.

lgtm

@Ryank90 Ryank90 merged commit c178270 into main Jun 25, 2026
5 checks passed
@Ryank90 Ryank90 deleted the fix/model-search-non-string-tag branch June 25, 2026 16:01
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