Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 5 additions & 6 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ sources:
- latest
mistral-google-cloud-source:
sourceNamespace: mistral-openapi-google-cloud
sourceRevisionDigest: sha256:4a5343e63c6a78152e472b00ccc46d7bcb15594496bc94c8040039d3a9d4c5f8
sourceBlobDigest: sha256:3327f078a11596abdcbc21cd8a1adcf0b2aa474975cd9ab1feb745a2e50d555f
sourceRevisionDigest: sha256:e3dd3079347edf744151936aaee4ec0ce3eeeb8f46b5c7f31f8e224221e879d4
sourceBlobDigest: sha256:7a525230930debff23fec4e92e3ad2a57889ea46de86cc96d519615709ae8a16
tags:
- latest
- speakeasy-sdk-regen-1742480568
mistral-openapi:
sourceNamespace: mistral-openapi
sourceRevisionDigest: sha256:ebe60088ce4a3780c57a08de7bc73f973f529822a05db12c5d9c6084e9a934e0
Expand All @@ -31,10 +30,10 @@ targets:
mistralai-gcp-sdk:
source: mistral-google-cloud-source
sourceNamespace: mistral-openapi-google-cloud
sourceRevisionDigest: sha256:4a5343e63c6a78152e472b00ccc46d7bcb15594496bc94c8040039d3a9d4c5f8
sourceBlobDigest: sha256:3327f078a11596abdcbc21cd8a1adcf0b2aa474975cd9ab1feb745a2e50d555f
sourceRevisionDigest: sha256:e3dd3079347edf744151936aaee4ec0ce3eeeb8f46b5c7f31f8e224221e879d4
sourceBlobDigest: sha256:7a525230930debff23fec4e92e3ad2a57889ea46de86cc96d519615709ae8a16
codeSamplesNamespace: mistral-openapi-google-cloud-code-samples
codeSamplesRevisionDigest: sha256:4b6150daaeabee64521e9cbfb209d2aaf84746dabd6e359a9728e18b5f25380a
codeSamplesRevisionDigest: sha256:63e197c345c5749f7eb5ed7dae8d66e8329f60f9aab32b884bce830bb0264825
mistralai-sdk:
source: mistral-openapi
sourceNamespace: mistral-openapi
Expand Down
8 changes: 8 additions & 0 deletions packages/mistralai-gcp/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/examples/node_modules
.DS_Store
**/.speakeasy/temp/
**/.speakeasy/logs/
.DS_Store
.env
.env.local
.env.*.local
/mcp-server
/bin
/.eslintcache
Expand Down
768 changes: 716 additions & 52 deletions packages/mistralai-gcp/.speakeasy/gen.lock

Large diffs are not rendered by default.

34 changes: 33 additions & 1 deletion packages/mistralai-gcp/.speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,56 @@ generation:
maintainOpenAPIOrder: true
usageSnippets:
optionalPropertyRendering: withExample
sdkInitStyle: constructor
useClassNamesForArrayFields: true
fixes:
nameResolutionDec2023: true
nameResolutionFeb2025: false
parameterOrderingFeb2024: true
requestResponseComponentNamesFeb2024: true
securityFeb2025: false
sharedErrorComponentsApr2025: false
sharedNestedComponentsJan2026: false
auth:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: false
hoistGlobalSecurity: true
schemas:
allOfMergeStrategy: shallowMerge
requestBodyFieldName: ""
persistentEdits: {}
tests:
generateTests: true
generateNewTests: false
skipResponseBodyAssertions: false
typescript:
version: 1.5.0
version: 1.7.0
acceptHeaderEnum: true
additionalDependencies:
dependencies:
google-auth-library: ^9.11.0
devDependencies: {}
peerDependencies: {}
additionalPackageJSON: {}
additionalScripts: {}
alwaysIncludeInboundAndOutbound: false
author: Speakeasy
baseErrorName: MistralGoogleCloudError
clientServerStatusCodesAsErrors: true
constFieldsAlwaysOptional: false

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I would recommend having this as true

defaultErrorName: SDKError
enableCustomCodeRegions: false
enableMCPServer: false
enableReactQuery: false
enumFormat: union
exportZodModelNamespace: false
flatAdditionalProperties: false
flattenGlobalSecurity: true
flatteningOrder: body-first
formStringArrayEncodeMode: encoded-string
forwardCompatibleEnumsByDefault: false
forwardCompatibleUnionsByDefault: "false"
generateExamples: true
imports:
option: openapi
paths:
Expand All @@ -39,14 +62,23 @@ typescript:
operations: models/operations
shared: models/components
webhooks: models/webhooks
inferUnionDiscriminators: true
inputModelSuffix: input
jsonpath: legacy
laxMode: strict
maxMethodParams: 0
methodArguments: require-security-and-request
modelPropertyCasing: camel
moduleFormat: commonjs
multipartArrayFormat: legacy
outputModelSuffix: output
packageName: '@mistralai/mistralai-gcp'
preApplyUnionDiscriminators: false
preserveModelFieldNames: false
responseFormat: flat
sseFlatResponse: false
templateVersion: v2
unionStrategy: left-to-right
usageSDKInitImports: []
useIndexModules: true
zodVersion: v3
32 changes: 9 additions & 23 deletions packages/mistralai-gcp/FUNCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ specific category of applications.
```typescript
import { MistralGoogleCloudCore } from "@mistralai/mistralai-gcp/core.js";
import { chatComplete } from "@mistralai/mistralai-gcp/funcs/chatComplete.js";
import { SDKValidationError } from "@mistralai/mistralai-gcp/models/errors/sdkvalidationerror.js";

// Use `MistralGoogleCloudCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
Expand All @@ -31,36 +30,23 @@ const mistralGoogleCloud = new MistralGoogleCloudCore({

async function run() {
const res = await chatComplete(mistralGoogleCloud, {
model: "mistral-small-latest",
model: "mistral-large-latest",
messages: [
{
content: "Who is the best French painter? Answer in one short sentence.",
role: "user",
},
],
responseFormat: {
type: "text",
},
});

switch (true) {
case res.ok:
// The success case will be handled outside of the switch block
break;
case res.error instanceof SDKValidationError:
// Pretty-print validation errors.
return console.log(res.error.pretty());
case res.error instanceof Error:
return console.log(res.error);
default:
// TypeScript's type checking will fail on the following line if the above
// cases were not exhaustive.
res.error satisfies never;
throw new Error("Assertion failed: expected error checks to be exhaustive: " + res.error);
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("chatComplete failed:", res.error);
}


const { value: result } = res;

// Handle the result
console.log(result);
}

run();
Expand Down
12 changes: 11 additions & 1 deletion packages/mistralai-gcp/RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,14 @@ Based on:
### Generated
- [typescript v1.5.0] packages/mistralai-gcp
### Releases
- [NPM v1.5.0] https://www.npmjs.com/package/@mistralai/mistralai-gcp/v/1.5.0 - packages/mistralai-gcp
- [NPM v1.5.0] https://www.npmjs.com/package/@mistralai/mistralai-gcp/v/1.5.0 - packages/mistralai-gcp

## 2026-01-20 13:41:51
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.606.10 (2.687.13) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v2.0.0] packages/mistralai-gcp
### Releases
- [NPM v2.0.0] https://www.npmjs.com/package/@mistralai/mistralai-gcp/v/2.0.0 - packages/mistralai-gcp
12 changes: 6 additions & 6 deletions packages/mistralai-gcp/RUNTIMES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

This SDK is intended to be used in JavaScript runtimes that support ECMAScript 2020 or newer. The SDK uses the following features:

* [Web Fetch API][web-fetch]
* [Web Streams API][web-streams] and in particular `ReadableStream`
* [Async iterables][async-iter] using `Symbol.asyncIterator`
- [Web Fetch API][web-fetch]
- [Web Streams API][web-streams] and in particular `ReadableStream`
- [Async iterables][async-iter] using `Symbol.asyncIterator`

[web-fetch]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
[web-streams]: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API
Expand All @@ -25,7 +25,7 @@ Runtime environments that are explicitly supported are:

The following `tsconfig.json` options are recommended for projects using this
SDK in order to get static type support for features like async iterables,
streams and `fetch`-related APIs ([`for await...of`][for-await-of],
streams and `fetch`-related APIs ([`for await...of`][for-await-of],
[`AbortSignal`][abort-signal], [`Request`][request], [`Response`][response] and
so on):

Expand All @@ -38,11 +38,11 @@ so on):
{
"compilerOptions": {
"target": "es2020", // or higher
"lib": ["es2020", "dom", "dom.iterable"],
"lib": ["es2020", "dom", "dom.iterable"]
}
}
```

While `target` can be set to older ECMAScript versions, it may result in extra,
unnecessary compatibility code being generated if you are not targeting old
runtimes.
runtimes.
2 changes: 2 additions & 0 deletions packages/mistralai-gcp/docs/models/components/arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
```typescript
const value: { [k: string]: any } = {
"key": "<value>",
"key1": "<value>",
"key2": "<value>",
};
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ const value: string = "<value>";
### `components.ContentChunk[]`

```typescript
const value: components.ContentChunk[] = [
{
imageUrl: {
url: "https://jittery-window.com",
},
type: "image_url",
},
];
const value: components.ContentChunk[] = [];
```

Loading