Skip to content

feat(ai): Schema title, maximum, minimum, and propertyOrdering #9047

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dlarocque
Copy link
Contributor

Adds new properties to SchemaShared; title, maximum, minimum, and propertyOrdering. I added these properties to the unit tests.

The unit tests in schema-builder.test.ts were refactored to perform smaller property comparisons instead of direct large object comparisons. I found that this makes tests easier to read, and less brittle to failures from small unrelated changes to the large test objects.

@dlarocque dlarocque requested a review from hsubox76 May 15, 2025 15:04
@dlarocque dlarocque requested review from a team as code owners May 15, 2025 15:05
Copy link

changeset-bot bot commented May 15, 2025

🦋 Changeset detected

Latest commit: 16742c9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
firebase Minor
@firebase/ai Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

Vertex AI Mock Responses Check ⚠️

A newer major version of the mock responses for Vertex AI unit tests is available. update_vertexai_responses.sh should be updated to clone the latest version of the responses: v13.0

@google-oss-bot
Copy link
Contributor

google-oss-bot commented May 15, 2025

Size Report 1

Affected Products

  • @firebase/storage

    TypeBase (799de59)Merge (7378acb)Diff
    browser58.5 kB58.5 kB+1 B (+0.0%)
    main60.1 kB60.1 kB+1 B (+0.0%)
    module58.5 kB58.5 kB+1 B (+0.0%)
  • @firebase/util

    TypeBase (799de59)Merge (7378acb)Diff
    browser29.3 kB29.3 kB-3 B (-0.0%)
    main35.7 kB35.7 kB-3 B (-0.0%)
    module29.3 kB29.3 kB-3 B (-0.0%)
  • bundle

    34 size changes

    TypeBase (799de59)Merge (7378acb)Diff
    auth (GoogleFBTwitterGitHubPopup)109 kB109 kB-3 B (-0.0%)
    database (Append to a list of data)154 kB154 kB-3 B (-0.0%)
    database (Filtering data)153 kB153 kB-3 B (-0.0%)
    database (Listen for child events)170 kB170 kB-3 B (-0.0%)
    database (Listen for value events + Detach listeners)170 kB170 kB-3 B (-0.0%)
    database (Listen for value events)170 kB170 kB-3 B (-0.0%)
    database (Read data once)169 kB169 kB-3 B (-0.0%)
    database (Save data as transactions)172 kB172 kB-3 B (-0.0%)
    database (Sort data)155 kB155 kB-3 B (-0.0%)
    database (Write data)154 kB154 kB-3 B (-0.0%)
    firestore (CSI Auto Indexing Disable and Delete)280 kB280 kB-3 B (-0.0%)
    firestore (CSI Auto Indexing Enable)280 kB280 kB-3 B (-0.0%)
    firestore (Persistence)311 kB311 kB-3 B (-0.0%)
    firestore (Query Cursors)256 kB256 kB-3 B (-0.0%)
    firestore (Query)254 kB254 kB-3 B (-0.0%)
    firestore (Read data once)242 kB242 kB-3 B (-0.0%)
    firestore (Read Write w Persistence)335 kB335 kB-3 B (-0.0%)
    firestore (Realtime updates)244 kB244 kB-3 B (-0.0%)
    firestore (Transaction)221 kB221 kB-3 B (-0.0%)
    firestore (Write data)220 kB220 kB-3 B (-0.0%)
    firestore-lite (Query Cursors)109 kB109 kB-3 B (-0.0%)
    firestore-lite (Query)105 kB105 kB-3 B (-0.0%)
    firestore-lite (Read data once)80.7 kB80.7 kB-3 B (-0.0%)
    firestore-lite (Transaction)106 kB106 kB-3 B (-0.0%)
    firestore-lite (Write data)90.3 kB90.3 kB-3 B (-0.0%)
    functions (call)39.4 kB39.4 kB-3 B (-0.0%)
    storage (getBytes)47.2 kB47.2 kB-2 B (-0.0%)
    storage (getDownloadURL)49.3 kB49.3 kB-2 B (-0.0%)
    storage (getMetadata)48.7 kB48.7 kB-2 B (-0.0%)
    storage (list + listAll)48.1 kB48.1 kB-2 B (-0.0%)
    storage (updateMetadata)49.0 kB49.0 kB-2 B (-0.0%)
    storage (uploadBytes)53.8 kB53.8 kB-2 B (-0.0%)
    storage (uploadBytesResumable)63.8 kB63.8 kB-2 B (-0.0%)
    storage (uploadString)54.0 kB54.0 kB-2 B (-0.0%)

  • firebase

    14 size changes

    TypeBase (799de59)Merge (7378acb)Diff
    firebase-auth-compat.js145 kB145 kB-3 B (-0.0%)
    firebase-auth-cordova.js142 kB142 kB-3 B (-0.0%)
    firebase-auth-web-extension.js125 kB125 kB-3 B (-0.0%)
    firebase-auth.js163 kB163 kB-3 B (-0.0%)
    firebase-compat.js802 kB802 kB-2 B (-0.0%)
    firebase-database-compat.js168 kB168 kB-3 B (-0.0%)
    firebase-database.js192 kB192 kB-3 B (-0.0%)
    firebase-firestore-compat.js347 kB347 kB-3 B (-0.0%)
    firebase-firestore-lite.js137 kB137 kB-3 B (-0.0%)
    firebase-firestore.js449 kB449 kB-3 B (-0.0%)
    firebase-functions-compat.js14.7 kB14.7 kB-3 B (-0.0%)
    firebase-functions.js19.5 kB19.5 kB-3 B (-0.0%)
    firebase-storage-compat.js44.2 kB44.2 kB-2 B (-0.0%)
    firebase-storage.js51.2 kB51.2 kB-2 B (-0.0%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/534MXKw4r9.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented May 15, 2025

Size Analysis Report 1

This report is too large (84,761 characters) to be displayed here in a GitHub comment. Please use the below link to see the full report on Google Cloud Storage.

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/R1B4LYK9T9.html

/** Optional. The items of the property. */
items?: T;
/** Optional. Map of `Schema` objects. */
properties?: {
[k: string]: T;
};
/**
* A hint to the gemini model, suggesting the order in which the keys should appear in the
Copy link
Contributor

Choose a reason for hiding this comment

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

Gemini capitalized. Actually is this only for Gemini models?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's only for Gemini models, but just in case i'll reword this to simply 'A hint suggesting the order in which the keys should appear in the generated JSON string.'

@dlarocque dlarocque requested a review from hsubox76 May 16, 2025 19:00
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