Skip to content

Add C++ SDK Support#544

Open
nenad1002 wants to merge 13 commits intomainfrom
nebanfic/cpp-sdk
Open

Add C++ SDK Support#544
nenad1002 wants to merge 13 commits intomainfrom
nebanfic/cpp-sdk

Conversation

@nenad1002
Copy link
Copy Markdown
Contributor

  • pipeline support missing, will come in future
  • ARM support will come soon

Copilot AI review requested due to automatic review settings March 23, 2026 20:08
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
foundry-local Ready Ready Preview, Comment Apr 1, 2026 4:35pm

Request Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces an initial C++ SDK under sdk/cpp/, including the core API surface (manager/catalog/model/client), a CMake-based build, unit tests, and sample usage.

Changes:

  • Add C++ SDK public headers and a Windows (WIL-based) implementation.
  • Add CMake project/presets plus formatting configuration for the C++ SDK.
  • Add GTest unit tests and JSON testdata fixtures covering parsing, catalog/model behavior, and client requests.

Reviewed changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
sdk/cpp/CMakeLists.txt Defines the C++ SDK library, sample, and unit tests; Windows-only guard and dependencies.
sdk/cpp/CMakePresets.json Adds configure/build/test presets for building the C++ SDK.
sdk/cpp/.clang-format Establishes C++ formatting rules for the SDK.
sdk/cpp/include/foundry_local.h Public C++ SDK API surface (manager, catalog, model/variant, chat/audio clients, types).
sdk/cpp/include/configuration.h Configuration types/validation for initializing Foundry Local from C++.
sdk/cpp/include/core_interop_request.h Helper for building JSON-wrapped core requests with Params.
sdk/cpp/include/flcore_native.h Native ABI struct/function-pointer definitions for calling the core DLL.
sdk/cpp/include/foundry_local_exception.h SDK exception type with optional logging.
sdk/cpp/include/foundry_local_internal_core.h Internal core interface abstraction used by SDK types/tests.
sdk/cpp/include/logger.h Logger interface + NullLogger implementation.
sdk/cpp/include/log_level.h LogLevel enum and string conversion helper.
sdk/cpp/include/parser.h JSON (de)serialization helpers for model info, chat, tool calling, etc.
sdk/cpp/src/foundry_local.cpp Main SDK implementation: DLL loading, manager/catalog/model/clients, streaming callbacks.
sdk/cpp/sample/main.cpp Example app demonstrating catalog browsing, chat (streaming/non), audio, tool calling, and variant selection.
sdk/cpp/test/mock_core.h Mock/file-backed core implementations + file reading helper for tests.
sdk/cpp/test/mock_object_factory.h Test factory enabling construction of private-constructor SDK types.
sdk/cpp/test/parser_and_types_test.cpp Unit tests for parsing/serialization utilities and small type behaviors.
sdk/cpp/test/model_variant_test.cpp Unit tests for ModelVariant and Model behaviors (load/cache/download/path/selection).
sdk/cpp/test/client_test.cpp Unit tests for ChatClient/AudioClient request formatting and streaming.
sdk/cpp/test/catalog_test.cpp Unit tests for Catalog grouping/filtering/caching and file-based fixtures.
sdk/cpp/test/testdata/empty_models_list.json Fixture: empty model list.
sdk/cpp/test/testdata/malformed_models_list.json Fixture: malformed JSON for error-path testing.
sdk/cpp/test/testdata/missing_name_field_models_list.json Fixture: missing required fields for validation/error tests.
sdk/cpp/test/testdata/mixed_openai_and_local.json Fixture: mix of OpenAI-prefixed and local models for filtering tests.
sdk/cpp/test/testdata/real_models_list.json Fixture: richer realistic model entries with optional fields/runtime/template.
sdk/cpp/test/testdata/single_cached_model.json Fixture: one cached model entry for subset tests.
sdk/cpp/test/testdata/three_variants_one_model.json Fixture: multiple variants under one alias for grouping tests.
sdk/cpp/test/testdata/valid_cached_models.json Fixture: cached model IDs list.
sdk/cpp/test/testdata/valid_loaded_models.json Fixture: loaded model IDs list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

3 participants