feat(clients): mistral: La Plateforme package, 347-op call table, typed services, ChatModel, demo

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-25 15:08:12 +01:00
co-authored by Claude Sonnet 5.5
parent 3db67fcf1f
commit d2e2888ef4
62 changed files with 7573 additions and 3 deletions
+52
View File
@@ -0,0 +1,52 @@
#pragma once
// Models: GET /v1/models, GET /v1/models/{id}, DELETE /v1/models/{id} (own
// fine-tuned models only; explicit, irreversible). BaseModelCard and
// FTModelCard are told apart by `type` ("base" | "fine-tuned").
#include <string>
#include <vector>
#include "vendors/mistral/types.h"
namespace molo::mistral {
struct ModelCapabilities {
bool completion_chat = false, function_calling = false, reasoning = false, completion_fim = false;
bool fine_tuning = false, vision = false, ocr = false, classification = false, moderation = false;
bool audio = false, audio_transcription = false, audio_speech = false;
static ModelCapabilities parse(const Json* caps);
};
struct ModelCard {
std::string id, type, owned_by, name, description, deprecation, job, root;
long created = 0, max_context_length = 0;
bool archived = false;
std::vector<std::string> aliases;
ModelCapabilities capabilities;
bool fine_tuned() const { return type == "fine-tuned"; }
static ModelCard parse(const Json& doc);
};
struct ModelList {
std::vector<ModelCard> models;
bool truncated = false;
Json raw;
static ModelList parse(const Json& doc);
const ModelCard* find(const std::string& id) const;
};
struct ModelDeleted {
std::string id;
bool deleted = false;
};
class Models : public MistralService {
public:
explicit Models(std::shared_ptr<llm::ApiClient> client) : MistralService(std::move(client)) {}
ModelList list(const std::string& provider = "", const std::string& model = "");
ModelCard get(const std::string& model_id);
ModelDeleted remove(const std::string& model_id); // explicit, irreversible
};
} // namespace molo::mistral