Skip to content

Usage of vertex model gives type error #63

@maidi29

Description

@maidi29

I use the vertex model to create the agent:

import { vertex } from '@ai-sdk/google-vertex';
export { createAgent } from '@statelyai/agent';

createAgent({
    model: vertex('gemini-1.5-pro'),
    ...
  });

but it gives the following type error:

Type '{ type: "reasoning"; textDelta: string; }' is not assignable to type 'LanguageModelV1StreamPart'.
Type '{ type: "reasoning"; textDelta: string; }' is not assignable to type '{ type: "text-delta"; textDelta: string; }'.
Types of property 'type' are incompatible.
Type '"reasoning"' is not assignable to type '"text-delta"'

However, if I declare as any the agent seems to work as expected so it is maybe only a typing issue?

Versions:

 "@ai-sdk/google-vertex": "2.1.1",
 "@statelyai/agent": "1.1.6"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions