Skip to content

Merge with main #9099

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

Merged
merged 26 commits into from
Jun 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e4297f7
Merge main into release
google-oss-bot May 15, 2025
2fe7547
Version Packages (#9016)
google-oss-bot May 20, 2025
35ad526
Revert "Fixed scroll behavior (#8977)" (#9053)
maneesht May 20, 2025
e96410a
Merge main into release
google-oss-bot May 20, 2025
b5df4ae
Updated to only show banner when calling connect*Emulator (#9055)
maneesht May 21, 2025
4ead831
Merge main into release
google-oss-bot May 21, 2025
770e455
Version Packages (#9054)
google-oss-bot May 22, 2025
9964849
Close webchannel instances on terminate (#9041)
MarkDuckworth May 22, 2025
d5e5795
Reorder reporters to prevent log message duplication in CI (#9040)
MarkDuckworth May 22, 2025
ec91a86
docs(ai): Fix 'occured' typo in error codes (#9021)
dlarocque May 27, 2025
8cb21ff
feat(ai): Add `HarmBlockThreshold.OFF` (#9050)
dlarocque May 27, 2025
40be2db
feat(ai): Schema `title`, `maximum`, `minimum`, and `propertyOrdering…
dlarocque May 27, 2025
1933324
feat(ai): Add support for `minItems` and `maxItems` to `Schema` (#9026)
dlarocque May 28, 2025
af9f8b5
Build out e2e subdirectories (#9065)
hsubox76 May 30, 2025
30de503
Added test project to fdc (#8924)
maneesht May 30, 2025
9be10d9
Merge main into release
google-oss-bot Jun 3, 2025
89051ca
Version Packages (#9073)
google-oss-bot Jun 5, 2025
d590889
test(ai): add integration tests (#8853)
dlarocque Jun 5, 2025
5871fd6
Update issue template to rename VertexAI > AI (#9074)
hsubox76 Jun 5, 2025
6cc9a07
ci: Fix Firefox error and streamline cross-browser tests (#9015)
hsubox76 Jun 5, 2025
c0617a3
Fixed issue where requestSts wasn't including the Studio cookie in it…
maneesht Jun 5, 2025
0f891d8
Fix issue where we ping an endpoint that hasn't been implemented (#9059)
maneesht Jun 6, 2025
2306920
Updated firebase auth changeset (#9088)
maneesht Jun 9, 2025
db2c5a5
Merge main into release
google-oss-bot Jun 10, 2025
a058309
build(all): Version Packages v11.9.1 (#9089)
google-oss-bot Jun 10, 2025
7fb64dd
test(ai): Upgrade mock responses to v14 (#9091)
dlarocque Jun 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .changeset/eighty-starfishes-listen.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/fast-mangos-chew.md

This file was deleted.

8 changes: 0 additions & 8 deletions .changeset/ninety-ways-dress.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/perfect-camels-try.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/tall-zoos-stare.md

This file was deleted.

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report_v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ body:
description: Select the Firebase product(s) relevant to your issue. You can select multiple options in the dropdown.
multiple: true
options:
- AI
- Analytics
- AppCheck
- Auth
Expand All @@ -72,7 +73,6 @@ body:
- Performance
- Remote-Config
- Storage
- VertexAI
validations:
required: true
- type: textarea
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:

defaults:
run:
# Run any command steps in the /e2e subdir
working-directory: './e2e'
# Run any command steps in the /e2e/smoke-tests subdir
working-directory: './e2e/smoke-tests'

steps:
- name: Checkout Repo
Expand All @@ -53,7 +53,9 @@ jobs:
- name: Poll npm until version to test is available for install
run: |
echo "Polling npm for firebase@${{ github.event.client_payload.versionOrTag }}"
node ../scripts/release/poll-npm-publish.js
node ./scripts/release/poll-npm-publish.js
# run in root
working-directory: '.'
env:
VERSION: ${{ github.event.client_payload.versionOrTag }}
- name: Yarn install
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,4 @@ vertexai-sdk-test-data
mocks-lookup.ts

# temp changeset output
changeset-temp.json
changeset-temp.json
22 changes: 21 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/node_modules/.bin/_mocha",
"cwd": "${workspaceRoot}/packages/vertexai",
"cwd": "${workspaceRoot}/packages/ai",
"args": [
"--require",
"ts-node/register",
Expand All @@ -24,6 +24,26 @@
},
"sourceMaps": true
},
{
"name": "AI Integration Tests (node)",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/node_modules/.bin/_mocha",
"cwd": "${workspaceRoot}/packages/ai",
"args": [
"--require",
"ts-node/register",
"--require",
"src/index.node.ts",
"--timeout",
"5000",
"integration/**/*.test.ts"
],
"env": {
"TS_NODE_COMPILER_OPTIONS": "{\"module\":\"commonjs\"}"
},
"sourceMaps": true
},
{
"type": "node",
"request": "launch",
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ and follow the instructions to login.

For more information, visit https://firebase.google.com/docs/storage/web/download-files#cors_configuration

Then, make sure you have anonymous sign-in provider enabled:

#### Authentication Support

Visit the authentication config in your project and enable the `Anonymous`
Expand Down
12 changes: 11 additions & 1 deletion common/api-review/ai.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,8 @@ export enum HarmBlockThreshold {
BLOCK_LOW_AND_ABOVE = "BLOCK_LOW_AND_ABOVE",
BLOCK_MEDIUM_AND_ABOVE = "BLOCK_MEDIUM_AND_ABOVE",
BLOCK_NONE = "BLOCK_NONE",
BLOCK_ONLY_HIGH = "BLOCK_ONLY_HIGH"
BLOCK_ONLY_HIGH = "BLOCK_ONLY_HIGH",
OFF = "OFF"
}

// @public
Expand Down Expand Up @@ -790,6 +791,9 @@ export abstract class Schema implements SchemaInterface {
format?: string;
// (undocumented)
static integer(integerParams?: SchemaParams): IntegerSchema;
items?: SchemaInterface;
maxItems?: number;
minItems?: number;
nullable: boolean;
// (undocumented)
static number(numberParams?: SchemaParams): NumberSchema;
Expand Down Expand Up @@ -831,10 +835,16 @@ export interface SchemaShared<T> {
example?: unknown;
format?: string;
items?: T;
maximum?: number;
maxItems?: number;
minimum?: number;
minItems?: number;
nullable?: boolean;
properties?: {
[k: string]: T;
};
propertyOrdering?: string[];
title?: string;
}

// @public
Expand Down
2 changes: 1 addition & 1 deletion config/karma.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const config = {
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['mocha', 'coverage-istanbul'],
reporters: ['coverage-istanbul', 'mocha'],

// web server port
port: 8089,
Expand Down
5 changes: 3 additions & 2 deletions docs-devsite/ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -448,13 +448,13 @@ export declare const enum AIErrorCode
| INVALID\_CONTENT | <code>&quot;invalid-content&quot;</code> | An error associated with a Content object. |
| INVALID\_SCHEMA | <code>&quot;invalid-schema&quot;</code> | An error due to invalid Schema input. |
| NO\_API\_KEY | <code>&quot;no-api-key&quot;</code> | An error occurred due to a missing Firebase API key. |
| NO\_APP\_ID | <code>&quot;no-app-id&quot;</code> | An error occured due to a missing Firebase app ID. |
| NO\_APP\_ID | <code>&quot;no-app-id&quot;</code> | An error occurred due to a missing Firebase app ID. |
| NO\_MODEL | <code>&quot;no-model&quot;</code> | An error occurred due to a model name not being specified during initialization. |
| NO\_PROJECT\_ID | <code>&quot;no-project-id&quot;</code> | An error occurred due to a missing project ID. |
| PARSE\_FAILED | <code>&quot;parse-failed&quot;</code> | An error occurred while parsing. |
| REQUEST\_ERROR | <code>&quot;request-error&quot;</code> | An error occurred in a request. |
| RESPONSE\_ERROR | <code>&quot;response-error&quot;</code> | An error occurred in a response. |
| UNSUPPORTED | <code>&quot;unsupported&quot;</code> | An error occured due an attempt to use an unsupported feature. |
| UNSUPPORTED | <code>&quot;unsupported&quot;</code> | An error occurred due an attempt to use an unsupported feature. |

## BlockReason

Expand Down Expand Up @@ -551,6 +551,7 @@ export declare enum HarmBlockThreshold
| BLOCK\_MEDIUM\_AND\_ABOVE | <code>&quot;BLOCK_MEDIUM_AND_ABOVE&quot;</code> | Content with <code>NEGLIGIBLE</code> and <code>LOW</code> will be allowed. |
| BLOCK\_NONE | <code>&quot;BLOCK_NONE&quot;</code> | All content will be allowed. |
| BLOCK\_ONLY\_HIGH | <code>&quot;BLOCK_ONLY_HIGH&quot;</code> | Content with <code>NEGLIGIBLE</code>, <code>LOW</code>, and <code>MEDIUM</code> will be allowed. |
| OFF | <code>&quot;OFF&quot;</code> | All content will be allowed. This is the same as <code>BLOCK_NONE</code>, but the metadata corresponding to the [HarmCategory](./ai.md#harmcategory) will not be present in the response. |

## HarmCategory

Expand Down
33 changes: 33 additions & 0 deletions docs-devsite/ai.schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ export declare abstract class Schema implements SchemaInterface
| [description](./ai.schema.md#schemadescription) | | string | Optional. The description of the property. |
| [example](./ai.schema.md#schemaexample) | | unknown | Optional. The example of the property. |
| [format](./ai.schema.md#schemaformat) | | string | Optional. The format of the property. Supported formats:<br/> <ul> <li>for NUMBER type: "float", "double"</li> <li>for INTEGER type: "int32", "int64"</li> <li>for STRING type: "email", "byte", etc</li> </ul> |
| [items](./ai.schema.md#schemaitems) | | [SchemaInterface](./ai.schemainterface.md#schemainterface_interface) | Optional. The items of the property. |
| [maxItems](./ai.schema.md#schemamaxitems) | | number | The maximum number of items (elements) in a schema of type [SchemaType.ARRAY](./ai.md#schematypearray_enummember)<!-- -->. |
| [minItems](./ai.schema.md#schemaminitems) | | number | The minimum number of items (elements) in a schema of type [SchemaType.ARRAY](./ai.md#schematypearray_enummember)<!-- -->. |
| [nullable](./ai.schema.md#schemanullable) | | boolean | Optional. Whether the property is nullable. Defaults to false. |
| [type](./ai.schema.md#schematype) | | [SchemaType](./ai.md#schematype) | Optional. The type of the property. [SchemaType](./ai.md#schematype)<!-- -->. |

Expand Down Expand Up @@ -93,6 +96,36 @@ Optional. The format of the property. Supported formats:<br/> <ul> <li>for NUMBE
format?: string;
```

## Schema.items

Optional. The items of the property.

<b>Signature:</b>

```typescript
items?: SchemaInterface;
```

## Schema.maxItems

The maximum number of items (elements) in a schema of type [SchemaType.ARRAY](./ai.md#schematypearray_enummember)<!-- -->.

<b>Signature:</b>

```typescript
maxItems?: number;
```

## Schema.minItems

The minimum number of items (elements) in a schema of type [SchemaType.ARRAY](./ai.md#schematypearray_enummember)<!-- -->.

<b>Signature:</b>

```typescript
minItems?: number;
```

## Schema.nullable

Optional. Whether the property is nullable. Defaults to false.
Expand Down
66 changes: 66 additions & 0 deletions docs-devsite/ai.schemashared.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,14 @@ export interface SchemaShared<T>
| [example](./ai.schemashared.md#schemasharedexample) | unknown | Optional. The example of the property. |
| [format](./ai.schemashared.md#schemasharedformat) | string | Optional. The format of the property. When using the Gemini Developer API ([GoogleAIBackend](./ai.googleaibackend.md#googleaibackend_class)<!-- -->), this must be either <code>'enum'</code> or <code>'date-time'</code>, otherwise requests will fail. |
| [items](./ai.schemashared.md#schemashareditems) | T | Optional. The items of the property. |
| [maximum](./ai.schemashared.md#schemasharedmaximum) | number | The maximum value of a numeric type. |
| [maxItems](./ai.schemashared.md#schemasharedmaxitems) | number | The maximum number of items (elements) in a schema of type [SchemaType.ARRAY](./ai.md#schematypearray_enummember)<!-- -->. |
| [minimum](./ai.schemashared.md#schemasharedminimum) | number | The minimum value of a numeric type. |
| [minItems](./ai.schemashared.md#schemasharedminitems) | number | The minimum number of items (elements) in a schema of type [SchemaType.ARRAY](./ai.md#schematypearray_enummember)<!-- -->. |
| [nullable](./ai.schemashared.md#schemasharednullable) | boolean | Optional. Whether the property is nullable. |
| [properties](./ai.schemashared.md#schemasharedproperties) | { \[k: string\]: T; } | Optional. Map of <code>Schema</code> objects. |
| [propertyOrdering](./ai.schemashared.md#schemasharedpropertyordering) | string\[\] | A hint suggesting the order in which the keys should appear in the generated JSON string. |
| [title](./ai.schemashared.md#schemasharedtitle) | string | The title of the property. This helps document the schema's purpose but does not typically constrain the generated value. It can subtly guide the model by clarifying the intent of a field. |

## SchemaShared.description

Expand Down Expand Up @@ -80,6 +86,46 @@ Optional. The items of the property.
items?: T;
```

## SchemaShared.maximum

The maximum value of a numeric type.

<b>Signature:</b>

```typescript
maximum?: number;
```

## SchemaShared.maxItems

The maximum number of items (elements) in a schema of type [SchemaType.ARRAY](./ai.md#schematypearray_enummember)<!-- -->.

<b>Signature:</b>

```typescript
maxItems?: number;
```

## SchemaShared.minimum

The minimum value of a numeric type.

<b>Signature:</b>

```typescript
minimum?: number;
```

## SchemaShared.minItems

The minimum number of items (elements) in a schema of type [SchemaType.ARRAY](./ai.md#schematypearray_enummember)<!-- -->.

<b>Signature:</b>

```typescript
minItems?: number;
```

## SchemaShared.nullable

Optional. Whether the property is nullable.
Expand All @@ -101,3 +147,23 @@ properties?: {
[k: string]: T;
};
```

## SchemaShared.propertyOrdering

A hint suggesting the order in which the keys should appear in the generated JSON string.

<b>Signature:</b>

```typescript
propertyOrdering?: string[];
```

## SchemaShared.title

The title of the property. This helps document the schema's purpose but does not typically constrain the generated value. It can subtly guide the model by clarifying the intent of a field.

<b>Signature:</b>

```typescript
title?: string;
```
Loading
Loading