Skip to content

fix: Mistral adapter — tool calling, model catalog, streaming#101

Open
ProfSynapse wants to merge 1 commit into
mainfrom
fix/mistral-adapter-improvements
Open

fix: Mistral adapter — tool calling, model catalog, streaming#101
ProfSynapse wants to merge 1 commit into
mainfrom
fix/mistral-adapter-improvements

Conversation

@ProfSynapse
Copy link
Copy Markdown
Owner

Summary

  • MistralAdapter: Add prepareMessages() to normalize conversation history for Mistral API (role mapping, tool_call_id, content coercion)
  • MistralModels: Update catalog to April 2026 — Mistral Large now 256K context, add Devstral, Codestral, Pixtral, Magistral models
  • ProviderHttpClient: Add node:http/https streaming fallback with proper timeout and chunked transfer handling
  • ToolContinuationService: Fix recursive tool continuation passing duplicate context
  • OpenAIContextBuilder: Fix tool result message formatting

Test plan

  • Unit tests: npm test -- --testPathPattern="MistralAdapter|ProviderHttpClient|OpenAIContextBuilder"
  • Live integration test (requires MISTRAL_API_KEY): npm test -- --testPathPattern="MistralChatLive"
  • Manual: Verify Mistral streaming chat with tool calls in Obsidian

🤖 Generated with Claude Code

…aming

- Add prepareMessages() to normalize conversation history for Mistral API
  (role mapping, tool_call_id, content coercion)
- Update MistralModels catalog to April 2026 (Mistral Large 256K context,
  add Devstral, Codestral, Pixtral, Magistral models)
- Fix ProviderHttpClient: add node:http/https streaming fallback with
  proper timeout and chunked transfer handling
- Fix ToolContinuationService: pass empty string instead of userPrompt
  in recursive tool continuation to avoid duplicate context
- Fix OpenAIContextBuilder: add getToolName() helper, improve tool result
  message formatting
- Add unit tests for MistralAdapter, ProviderHttpClient, OpenAIContextBuilder
- Add Mistral live integration test

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant