Commit Graph

31 Commits

Author SHA1 Message Date
c028dfb0ed feat!: sync with Python SDK v2.3.0 — workflow registration model + remove workers
Add CodeDefinition, SignalDefinition, QueryDefinition, UpdateDefinition
types for workflow interface metadata. Update Registration struct with
DeploymentID, Definition, and CompatibleWithChatAssistant fields.
Deprecate TaskQueue in favor of DeploymentID.

BREAKING CHANGE: Remove GetWorkflowWorkerInfo and workflow.WorkerInfo —
the /v1/workflows/workers/whoami endpoint was removed upstream.
v1.3.0
2026-04-03 18:53:15 +02:00
214fd02b3b docs: add v1.2.1 to upstream version table 2026-04-03 12:02:19 +02:00
3167966b98 chore: move module path to github.com/VikingOwl91/mistral-go-sdk
Public discoverability on pkg.go.dev. Also fixes stream tool call
test fixture to match real Mistral API responses (finish_reason, usage).
v1.2.1
2026-04-03 12:01:11 +02:00
e22732aa7c docs: update README with Workflows API, correct method/test counts v1.2.0 2026-04-02 16:58:16 +02:00
6928b9f1c9 chore: bump version to v1.2.0, update changelog and docs 2026-04-02 16:52:26 +02:00
0ab8064a06 feat(batch): add DeleteBatchJob method 2026-04-02 16:51:51 +02:00
c5b0011e30 feat: add workflow runs, schedules, and workers service methods 2026-04-02 16:49:35 +02:00
dc30e09c77 feat: add workflow events, deployments, and metrics service methods 2026-04-02 16:47:34 +02:00
3b0530a409 feat: add workflow execution service methods and WorkflowEventStream
14 execution service methods (Get, History, Stream, Signal, Query,
Update, Terminate, Cancel, Reset, BatchCancel, BatchTerminate, TraceOTel,
TraceSummary, TraceEvents), WorkflowEventStream with envelope unwrapping,
and ExecuteWorkflowAndWait with isTerminal polling. Extends StreamPayload
with WorkflowContext and BrokerSequence fields.
2026-04-02 16:42:35 +02:00
29aa8e0de1 feat: add workflows CRUD and registration service methods 2026-04-02 16:36:29 +02:00
910970f45e feat(workflow): add deployment, metrics, run, schedule, and registration types 2026-04-02 16:31:01 +02:00
a699495fc2 feat(workflow): add sealed Event interface with 17 types and UnmarshalEvent
Implements EventType/EventSource/Scope enums, eventBase struct, 17 concrete
event types with typed attributes for Started/Completed/Failed, UnknownEvent
fallback, UnmarshalEvent dispatcher, and SSE envelope types.
2026-04-02 16:27:39 +02:00
a41bf39325 feat(workflow): add package scaffold, core CRUD types, and execution types 2026-04-02 16:24:08 +02:00
58712f8364 docs: add workflows API implementation plan
10-task TDD plan covering workflow/ types package, 8 service files,
WorkflowEventStream, sealed Event interface, DeleteBatchJob, version
bump, and changelog update.
2026-04-02 16:15:57 +02:00
b2a1f141e0 docs: add workflows API integration design spec
Design spec for integrating Mistral Python SDK v2.2.0 changes into the
Go SDK v1.2.0. Covers Workflows API (37 methods across 8 sub-resources),
DeleteBatchJob addition, sealed event interface with 17 variants, and
SSE streaming with StreamPayload envelope.
2026-04-02 16:05:35 +02:00
aa5c53c407 feat: v1.1.0 — sync with upstream Python SDK v2.1.3
Add Connectors, Audio Speech/Voices, Audio Realtime types,
and Observability (beta). 41 new service methods, 116 total.

Breaking: ListModels and UploadFile signatures changed
(pass nil for previous behavior).
v1.1.0
2026-03-24 09:07:03 +01:00
b1f0fc4907 feat: v1.0.0 stable release — tracks upstream Python SDK v2.0.4 v1.0.0 2026-03-17 11:34:09 +01:00
94a938b733 docs: add pkg.go.dev badge to README 2026-03-17 11:31:19 +01:00
52231df17b feat: v0.2.0 — sync with upstream Python SDK v2.0.4
Add ToolReferenceChunk, ToolFileChunk, BuiltInConnector enum,
ReferenceID union type (int|string), GuardrailConfig with v1/v2
moderation, ConnectorTool for custom connectors, and guardrails
field on chat/agents/conversation requests.

Add AudioTranscriptionRealtime and AudioSpeech to ModelCapabilities.

Move GuardrailConfig from agents/ to chat/ as shared base type.
Remove bundled OpenAPI spec; SDK now tracks upstream Python SDK.

BREAKING: ReferenceChunk.ReferenceIDs changed from []int to
[]ReferenceID. Use IntRef(n) / StringRef(s) constructors.
v0.2.0
2026-03-17 11:23:58 +01:00
e1535f6522 docs: add pitch section and verified comparison table to README v0.1.0 2026-03-05 21:10:52 +01:00
4203160d10 fix: post-review fixes — metadata, unknown types, typed tools, API polish
1. Add README, LICENSE (MIT), .gitignore, Makefile, CHANGELOG
2. Add Version constant and User-Agent header to all requests
3. Rename SetStream to EnableStream (narrower API surface)
4. Fix FinishReason in CompletionStreamChoice to use typed *FinishReason
5. Type conversation entry Content as chat.Content instead of json.RawMessage
6. Graceful unknown type handling — UnknownEntry, UnknownEvent,
   UnknownChunk, UnknownMessage, UnknownAgentTool all return data
   instead of erroring on unrecognized discriminator values
7. Type agent tools with AgentTool sealed interface + UnmarshalAgentTool
8. Add pagination params to ListConversations and ListLibraries
9. Move openapi.yaml to docs/openapi.yaml
2026-03-05 20:51:24 +01:00
c79add6452 feat: Phase 10 polish — package docs, examples, integration tests
Add doc.go with package-level godoc for all 15 packages, runnable
example functions for chat completion, streaming, embeddings, and
error handling, plus build-tagged integration tests for live API
validation.
2026-03-05 20:12:02 +01:00
e528a3c308 feat: Phase 9 libraries + documents — CRUD, upload, sharing, signed URLs
Library management with 17 service methods covering full CRUD for
libraries and documents, multipart upload, text content extraction,
processing status, signed URLs, reprocessing, and sharing management.
2026-03-05 20:08:25 +01:00
d850a679d7 feat: Phase 8 OCR, audio, fine-tuning, batch jobs
OCR: document processing with pages, images, tables, dimensions.
Audio: transcription with file upload/URL, streaming events (language,
text delta, segment, done). Fine-tuning: job CRUD, cancel, start,
model archive/unarchive. Batch: job CRUD with cancel. Added
doMultipartStream for streaming multipart endpoints.
2026-03-05 20:04:05 +01:00
b9e914135b feat: Phase 7 agents CRUD + moderation + classification
Agents lifecycle: create, get, list, update, delete, version switching,
version listing, aliases (set/list/delete). Agent types include tools
(function, web_search, code_interpreter, etc.), guardrails, completion
args. Moderation: text + chat endpoints with categories and scores.
Classification: text + chat endpoints with target result scores.
2026-03-05 19:59:02 +01:00
a0236afcc2 feat: Phase 6 conversations — start, append, restart, stream, history
Conversations API with full CRUD: start, append, restart (+ stream
variants), get, list, delete, history, messages. Discriminated unions
for entries (6 types) and streaming events (10 types). EventStream
wraps Stream[json.RawMessage] with typed event dispatch.
2026-03-05 19:53:41 +01:00
2fecdbc2cc feat: Phase 5 retry + resilience — exponential backoff, jitter, Retry-After
Add retry logic to all HTTP methods:
- doRetry() core loop with configurable max retries
- Exponential backoff with 0.5-1.5x jitter
- Retry-After header support (seconds and HTTP-date)
- Retry on 429 and 5xx; no retry on 4xx client errors
- Context cancellation respected during retry delays
- Multipart uploads also retry via doRetry()
- 9 new tests: 429/500 recovery, exhaustion, no-retry-on-400, backoff math
2026-03-05 19:44:32 +01:00
6c22c9810b feat: Phase 4 models + files — CRUD, multipart upload, signed URLs
Add model and file management:
- model/model.go: ModelCard (unified base/fine-tuned), ModelCapabilities
- file/file.go: File, ListParams, Purpose/SampleType/Source enums
- ListModels, GetModel, DeleteModel service methods
- UploadFile (multipart/form-data), ListFiles (query params), GetFile,
  DeleteFile, GetFileContent (binary stream), GetFileURL (signed URL)
- doMultipart() HTTP helper for file uploads
- 13 new tests covering all endpoints including multipart parsing
2026-03-05 19:41:39 +01:00
4b8ca4be5d feat: Phase 3 core completions — FIM, Agents, Embeddings
Add FIM, Agents, and Embedding endpoints:
- fim/request.go: FIMCompletionRequest (prompt/suffix model)
- agents/request.go: AgentsCompletionRequest (agent_id + messages)
- embedding/embedding.go: Request/Response/Data types with dtype/encoding
- FIMComplete, FIMCompleteStream, AgentsComplete, AgentsCompleteStream,
  CreateEmbeddings service methods
- All reuse chat.CompletionResponse/CompletionChunk for responses
- 11 new httptest-based tests
2026-03-05 19:36:49 +01:00
9b453ca62a feat: Phase 2 streaming — SSE parser, Stream[T], ChatCompleteStream
Add streaming infrastructure:
- SSE line parser handling multi-line data, comments, [DONE] sentinel
- Generic Stream[T] pull-based iterator (no goroutines, no channel leaks)
- doStream() HTTP helper for streaming endpoints
- ChatCompleteStream() method
- 28 new tests: SSE edge cases, iterator behavior, httptest integration
2026-03-05 19:33:07 +01:00
9c85f64140 feat: Phase 1 foundation — client, chat types, ChatComplete
Implement core SDK skeleton with full chat completion support:
- Client with functional options (base URL, HTTP client, timeout, retry)
- APIError with sentinel checkers (IsNotFound, IsRateLimit, IsAuth)
- Chat types: Message (sealed interface, 4 types), ContentChunk (sealed
  interface, 7 types), Content (string|null|chunks union), Tool, ToolCall,
  ToolChoice, ResponseFormat with custom JSON marshal/unmarshal
- CompletionRequest/Response with discriminated union dispatch
- ChatComplete method with httptest-based tests (54 tests, all passing)
2026-03-05 19:30:57 +01:00