diff --git a/.changeset/chilly-parrots-remember.md b/.changeset/chilly-parrots-remember.md
new file mode 100644
index 00000000000..aaf0d766b44
--- /dev/null
+++ b/.changeset/chilly-parrots-remember.md
@@ -0,0 +1,5 @@
+---
+'@firebase/vertexai': minor
+---
+
+Add `systemInstruction`, `tools`, and `generationConfig` to `CountTokensRequest`.
diff --git a/common/api-review/vertexai.api.md b/common/api-review/vertexai.api.md
index 14c58e803e5..0ebc4f0769a 100644
--- a/common/api-review/vertexai.api.md
+++ b/common/api-review/vertexai.api.md
@@ -90,6 +90,9 @@ export interface Content {
export interface CountTokensRequest {
// (undocumented)
contents: Content[];
+ generationConfig?: GenerationConfig;
+ systemInstruction?: string | Part | Content;
+ tools?: Tool[];
}
// @public
diff --git a/docs-devsite/vertexai.counttokensrequest.md b/docs-devsite/vertexai.counttokensrequest.md
index db519b7eb11..f5875564588 100644
--- a/docs-devsite/vertexai.counttokensrequest.md
+++ b/docs-devsite/vertexai.counttokensrequest.md
@@ -23,6 +23,9 @@ export interface CountTokensRequest
| Property | Type | Description |
| --- | --- | --- |
| [contents](./vertexai.counttokensrequest.md#counttokensrequestcontents) | [Content](./vertexai.content.md#content_interface)\[\] | |
+| [generationConfig](./vertexai.counttokensrequest.md#counttokensrequestgenerationconfig) | [GenerationConfig](./vertexai.generationconfig.md#generationconfig_interface) | Configuration options that control how the model generates a response. |
+| [systemInstruction](./vertexai.counttokensrequest.md#counttokensrequestsysteminstruction) | string \| [Part](./vertexai.md#part) \| [Content](./vertexai.content.md#content_interface) | Instructions that direct the model to behave a certain way. |
+| [tools](./vertexai.counttokensrequest.md#counttokensrequesttools) | [Tool](./vertexai.md#tool)\[\] | [Tool](./vertexai.md#tool)
configuration. |
## CountTokensRequest.contents
@@ -31,3 +34,33 @@ export interface CountTokensRequest
```typescript
contents: Content[];
```
+
+## CountTokensRequest.generationConfig
+
+Configuration options that control how the model generates a response.
+
+Signature:
+
+```typescript
+generationConfig?: GenerationConfig;
+```
+
+## CountTokensRequest.systemInstruction
+
+Instructions that direct the model to behave a certain way.
+
+Signature:
+
+```typescript
+systemInstruction?: string | Part | Content;
+```
+
+## CountTokensRequest.tools
+
+[Tool](./vertexai.md#tool)
configuration.
+
+Signature:
+
+```typescript
+tools?: Tool[];
+```
diff --git a/packages/vertexai/src/types/requests.ts b/packages/vertexai/src/types/requests.ts
index dc7576f232d..5058b457365 100644
--- a/packages/vertexai/src/types/requests.ts
+++ b/packages/vertexai/src/types/requests.ts
@@ -114,6 +114,18 @@ export interface StartChatParams extends BaseParams {
*/
export interface CountTokensRequest {
contents: Content[];
+ /**
+ * Instructions that direct the model to behave a certain way.
+ */
+ systemInstruction?: string | Part | Content;
+ /**
+ * {@link Tool}
configuration.
+ */
+ tools?: Tool[];
+ /**
+ * Configuration options that control how the model generates a response.
+ */
+ generationConfig?: GenerationConfig;
}
/**