Commit Graph

26 Commits

Author SHA1 Message Date
0010fe1fac feat(batch): add DeleteBatchJob method 2026-04-02 16:51:51 +02:00
12a5f5932c feat: add workflow runs, schedules, and workers service methods 2026-04-02 16:49:35 +02:00
66c2a07d27 feat: add workflow events, deployments, and metrics service methods 2026-04-02 16:47:34 +02:00
56465b6b04 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
fada6050b8 feat: add workflows CRUD and registration service methods 2026-04-02 16:36:29 +02:00
c97e415e91 feat(workflow): add deployment, metrics, run, schedule, and registration types 2026-04-02 16:31:01 +02:00
f185a03f58 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
ae247c9e2e feat(workflow): add package scaffold, core CRUD types, and execution types
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 16:24:08 +02:00
ac99b539d6 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
03421f552e 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
9251672de6 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
beff613886 feat: v1.0.0 stable release — tracks upstream Python SDK v2.0.4 v1.0.0 2026-03-17 11:34:09 +01:00
852e0eaf62 docs: add pkg.go.dev badge to README 2026-03-17 11:31:19 +01:00
ea47d14b38 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
d2a40d17af docs: add pitch section and verified comparison table to README v0.1.0 2026-03-05 21:10:52 +01:00
2b980e14b3 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
5471723acc 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
890a6784c1 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
1458c36c6d 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
27b9e4ea23 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
8c655893fc 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
9778dd6a8e 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
75a726cbe2 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
07505b333f 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
4686ed6898 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
6332108c4d 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