Skip to content
Open
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
16 changes: 8 additions & 8 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
speakeasyVersion: 1.517.3
speakeasyVersion: 1.606.10
sources:
mistral-azure-source:
sourceNamespace: mistral-openapi-azure
Expand All @@ -9,11 +9,11 @@ sources:
- speakeasy-sdk-regen-1756133560
mistral-google-cloud-source:
sourceNamespace: mistral-openapi-google-cloud
sourceRevisionDigest: sha256:4a5343e63c6a78152e472b00ccc46d7bcb15594496bc94c8040039d3a9d4c5f8
sourceBlobDigest: sha256:3327f078a11596abdcbc21cd8a1adcf0b2aa474975cd9ab1feb745a2e50d555f
sourceRevisionDigest: sha256:6ebd7313536f2ff9a221e7cf8b9423cc740266e89f28c1103141f231562d6c7f
sourceBlobDigest: sha256:3fc6da55bf015d2fe6e14ae1a1098046e4730966be9b21f73cc2db4811e5dcc5
tags:
- latest
- speakeasy-sdk-regen-1742480568
- speakeasy-sdk-regen-1756820974
mistral-openapi:
sourceNamespace: mistral-openapi
sourceRevisionDigest: sha256:eefc1f0b6a5e9ec673d317d61cad766290710b5fc369412491b75f732cccfedd
Expand All @@ -32,10 +32,10 @@ targets:
mistralai-gcp-sdk:
source: mistral-google-cloud-source
sourceNamespace: mistral-openapi-google-cloud
sourceRevisionDigest: sha256:4a5343e63c6a78152e472b00ccc46d7bcb15594496bc94c8040039d3a9d4c5f8
sourceBlobDigest: sha256:3327f078a11596abdcbc21cd8a1adcf0b2aa474975cd9ab1feb745a2e50d555f
sourceRevisionDigest: sha256:6ebd7313536f2ff9a221e7cf8b9423cc740266e89f28c1103141f231562d6c7f
sourceBlobDigest: sha256:3fc6da55bf015d2fe6e14ae1a1098046e4730966be9b21f73cc2db4811e5dcc5
codeSamplesNamespace: mistral-openapi-google-cloud-code-samples
codeSamplesRevisionDigest: sha256:4b6150daaeabee64521e9cbfb209d2aaf84746dabd6e359a9728e18b5f25380a
codeSamplesRevisionDigest: sha256:900700ca7d24d86b456a8249c47d8e3d6b018b6b9df4a763f6cbaaa82e8b5d95
mistralai-sdk:
source: mistral-openapi
sourceNamespace: mistral-openapi
Expand All @@ -45,7 +45,7 @@ targets:
codeSamplesRevisionDigest: sha256:34e2099c693e2889e7a954dd68353d33403f7b2bdb0eb39e2c69f3c8c1e58b70
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.517.3
speakeasyVersion: v1.606.10
sources:
mistral-azure-source:
inputs:
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
49 changes: 31 additions & 18 deletions packages/mistralai-gcp/.speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,39 +1,40 @@
lockVersion: 2.0.0
id: c6044247-eaf9-46da-b078-0e1334e93be2
management:
docChecksum: 28fe1ab59b4dee005217f2dbbd836060
docVersion: 0.0.2
speakeasyVersion: 1.517.3
generationVersion: 2.548.6
releaseVersion: 1.5.0
configChecksum: 1c5e28cded8c5d3a7d735e20f6f09b99
docChecksum: 14c4b1b2397cbfd401cc9e73d4f3236f
docVersion: 1.0.0
speakeasyVersion: 1.606.10
generationVersion: 2.687.13
releaseVersion: 1.6.0
configChecksum: 36a28c11b7aeab0315d39474accbc4d6
repoURL: https://github.com/mistralai/client-ts.git
repoSubDirectory: packages/mistralai-gcp
installationURL: https://gitpkg.now.sh/mistralai/client-ts/packages/mistralai-gcp
published: true
features:
typescript:
additionalDependencies: 0.1.0
constsAndDefaults: 0.1.11
core: 3.21.4
additionalProperties: 0.1.1
constsAndDefaults: 0.1.12
core: 3.21.20
defaultEnabledRetries: 0.1.0
enumUnions: 0.1.0
envVarSecurityUsage: 0.1.2
examples: 2.81.5
examples: 2.82.3
globalSecurity: 2.82.13
globalSecurityCallbacks: 0.1.0
globalSecurityFlattening: 0.1.0
globalServerURLs: 2.82.4
globalServerURLs: 2.82.5
nameOverrides: 2.81.2
nullables: 0.1.1
openEnums: 0.1.1
responseFormat: 0.2.3
retries: 2.83.0
sdkHooks: 0.2.0
serverEvents: 0.1.5
sdkHooks: 0.3.0
serverEvents: 0.1.8
serverEventsSentinels: 0.1.0
serverIDs: 2.81.2
unions: 2.85.8
unions: 2.85.11
generatedFiles:
- .gitattributes
- .npmignore
Expand Down Expand Up @@ -75,6 +76,7 @@ generatedFiles:
- docs/models/components/jsonschema.md
- docs/models/components/loc.md
- docs/models/components/messages.md
- docs/models/components/mistralpromptmode.md
- docs/models/components/prediction.md
- docs/models/components/referencechunk.md
- docs/models/components/referencechunktype.md
Expand All @@ -85,7 +87,11 @@ generatedFiles:
- docs/models/components/stop.md
- docs/models/components/systemmessage.md
- docs/models/components/systemmessagecontent.md
- docs/models/components/systemmessagecontentchunks.md
- docs/models/components/textchunk.md
- docs/models/components/thinkchunk.md
- docs/models/components/thinkchunktype.md
- docs/models/components/thinking.md
- docs/models/components/tool.md
- docs/models/components/toolcall.md
- docs/models/components/toolchoice.md
Expand All @@ -102,6 +108,9 @@ generatedFiles:
- docs/models/components/validationerror.md
- docs/models/errors/httpvalidationerror.md
- eslint.config.mjs
- examples/.env.template
- examples/chatComplete.example.ts
- examples/package.json
- jsr.json
- package.json
- src/core.ts
Expand Down Expand Up @@ -149,13 +158,16 @@ generatedFiles:
- src/models/components/imageurlchunk.ts
- src/models/components/index.ts
- src/models/components/jsonschema.ts
- src/models/components/mistralpromptmode.ts
- src/models/components/prediction.ts
- src/models/components/referencechunk.ts
- src/models/components/responseformat.ts
- src/models/components/responseformats.ts
- src/models/components/security.ts
- src/models/components/systemmessage.ts
- src/models/components/systemmessagecontentchunks.ts
- src/models/components/textchunk.ts
- src/models/components/thinkchunk.ts
- src/models/components/tool.ts
- src/models/components/toolcall.ts
- src/models/components/toolchoice.ts
Expand All @@ -168,6 +180,8 @@ generatedFiles:
- src/models/errors/httpclienterrors.ts
- src/models/errors/httpvalidationerror.ts
- src/models/errors/index.ts
- src/models/errors/mistralgoogleclouderror.ts
- src/models/errors/responsevalidationerror.ts
- src/models/errors/sdkerror.ts
- src/models/errors/sdkvalidationerror.ts
- src/sdk/chat.ts
Expand All @@ -191,14 +205,13 @@ examples:
responses:
"422":
application/json: {}
"200": {}
chat_completion_v1_chat_completions_post:
speakeasy-default-chat-completion-v1-chat-completions-post:
requestBody:
application/json: {"model": "mistral-small-latest", "stream": false, "messages": [{"content": "Who is the best French painter? Answer in one short sentence.", "role": "user"}]}
responses:
"200":
application/json: {"id": "cmpl-e5cc70bb28c444948073e77776eb30ef", "object": "chat.completion", "model": "mistral-small-latest", "usage": {"prompt_tokens": 16, "completion_tokens": 34, "total_tokens": 50}, "created": 1702256327, "choices": [{"index": 0, "message": {"prefix": false, "role": "assistant"}, "finish_reason": "stop"}, {"index": 0, "message": {"prefix": false, "role": "assistant"}, "finish_reason": "stop"}, {"index": 0, "message": {"prefix": false, "role": "assistant"}, "finish_reason": "stop"}]}
application/json: {"id": "cmpl-e5cc70bb28c444948073e77776eb30ef", "object": "chat.completion", "model": "mistral-small-latest", "usage": {"prompt_tokens": 0, "completion_tokens": 0, "total_tokens": 0}, "created": 1702256327, "choices": []}
"422":
application/json: {}
stream_fim:
Expand All @@ -208,15 +221,15 @@ examples:
responses:
"422":
application/json: {}
"200": {}
fim_completion_v1_fim_completions_post:
speakeasy-default-fim-completion-v1-fim-completions-post:
requestBody:
application/json: {"model": "codestral-2405", "top_p": 1, "stream": false, "prompt": "def", "suffix": "return a+b"}
responses:
"200":
application/json: {"id": "cmpl-e5cc70bb28c444948073e77776eb30ef", "object": "chat.completion", "model": "codestral-latest", "usage": {"prompt_tokens": 16, "completion_tokens": 34, "total_tokens": 50}, "created": 1702256327, "choices": [{"index": 0, "message": {"prefix": false, "role": "assistant"}, "finish_reason": "stop"}, {"index": 0, "message": {"prefix": false, "role": "assistant"}, "finish_reason": "stop"}, {"index": 0, "message": {"prefix": false, "role": "assistant"}, "finish_reason": "stop"}]}
application/json: {"id": "cmpl-e5cc70bb28c444948073e77776eb30ef", "object": "chat.completion", "model": "codestral-latest", "usage": {"prompt_tokens": 0, "completion_tokens": 0, "total_tokens": 0}, "created": 1702256327, "choices": []}
"422":
application/json: {}
examplesVersion: 1.0.0
examplesVersion: 1.0.2
generatedTests: {}
releaseNotes: "## SDK Changes Detected:\n* `mistralgooglecloud.chat.complete()`: \n * `request` **Changed** **Breaking** :warning:\n * `response` **Changed**\n* `mistralgooglecloud.fim.complete()`: `response` **Changed**\n"
12 changes: 11 additions & 1 deletion packages/mistralai-gcp/.speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,42 @@ generation:
maintainOpenAPIOrder: true
usageSnippets:
optionalPropertyRendering: withExample
sdkInitStyle: constructor
useClassNamesForArrayFields: true
fixes:
nameResolutionDec2023: true
nameResolutionFeb2025: false
parameterOrderingFeb2024: true
requestResponseComponentNamesFeb2024: true
securityFeb2025: false
sharedErrorComponentsApr2025: false
auth:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: false
tests:
generateTests: true
generateNewTests: false
skipResponseBodyAssertions: false
typescript:
version: 1.5.0
version: 1.6.0
additionalDependencies:
dependencies:
google-auth-library: ^9.11.0
devDependencies: {}
peerDependencies: {}
additionalPackageJSON: {}
author: Speakeasy
baseErrorName: MistralGoogleCloudError
clientServerStatusCodesAsErrors: true
constFieldsAlwaysOptional: true
defaultErrorName: SDKError
enableCustomCodeRegions: false
enableMCPServer: false
enableReactQuery: false
enumFormat: union
flattenGlobalSecurity: true
flatteningOrder: body-first
generateExamples: true
imports:
option: openapi
paths:
Expand All @@ -48,4 +57,5 @@ typescript:
packageName: '@mistralai/mistralai-gcp'
responseFormat: flat
templateVersion: v2
usageSDKInitImports: []
useIndexModules: true
27 changes: 5 additions & 22 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 @@ -39,28 +38,12 @@ async function run() {
},
],
});

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

## 2025-09-02 13:49:18
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.606.10 (2.687.13) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v1.6.0] packages/mistralai-gcp
### Releases
- [NPM v1.6.0] https://www.npmjs.com/package/@mistralai/mistralai-gcp/v/1.6.0 - packages/mistralai-gcp
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