feat(clients): anthropic core: messages, streaming, tools, batches, models, files, skills, spec checker, demo

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 07:56:17 +02:00
co-authored by Claude Sonnet 5.5
parent 2e0270c043
commit 7dabca5702
57 changed files with 7139 additions and 3 deletions
+31
View File
@@ -0,0 +1,31 @@
#include "anthropic/core/version.h"
#include "llm/error.h"
namespace molo::anthropic::core {
// VERSIONS-BEGIN (checked against docs api/versioning by tools/check_spec.py)
static const VersionInfo kVersions[] = {
{ApiVersion::k20230601, "2023-06-01", true, true, true},
{ApiVersion::k20261021, "2026-10-21", false, false, false},
};
// VERSIONS-END
const VersionInfo& version_info(ApiVersion version) {
for (const VersionInfo& v : kVersions)
if (v.version == version) return v;
return kVersions[0];
}
const char* version_name(ApiVersion version) { return version_info(version).wire; }
ApiVersion parse_version(const std::string& wire) {
for (const VersionInfo& v : kVersions)
if (wire == v.wire) return v.version;
throw llm::ApiError::invalid("anthropic", "unknown anthropic-version '" + wire + "'");
}
std::size_t version_count() { return sizeof(kVersions) / sizeof(kVersions[0]); }
const VersionInfo& version_at(std::size_t index) { return kVersions[index]; }
} // namespace molo::anthropic::core