Skip to content

Commit eabb3c8

Browse files
authored
Update Provider Type to FoundryLocal (#920)
Change model provider type from AzureFoundry to FoundryLocal. Legacy `ProviderType` was `AzureFoundry`. But we updated it based on a request to `FoundryLocal` in the C# Core. When translating to c++, that change was not picked up.
1 parent 5570b09 commit eabb3c8

9 files changed

Lines changed: 13 additions & 13 deletions

File tree

sdk_v2/cpp/include/foundry_local/foundry_local_c.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ typedef enum flTensorDataType {
249249
#define FOUNDRY_LOCAL_MODEL_PROP_LICENSE_STR "license" ///< optional
250250
#define FOUNDRY_LOCAL_MODEL_PROP_LICENSE_DESCRIPTION_STR "license_description" ///< optional
251251
#define FOUNDRY_LOCAL_MODEL_PROP_TASK_STR "task" ///< e.g. "chat-completion", "text-generation"
252-
#define FOUNDRY_LOCAL_MODEL_PROP_MODEL_PROVIDER_STR "model_provider" ///< e.g. "AzureCatalog"
252+
#define FOUNDRY_LOCAL_MODEL_PROP_MODEL_PROVIDER_STR "model_provider" ///< e.g. "FoundryLocal"
253253
#define FOUNDRY_LOCAL_MODEL_PROP_MIN_FL_VERSION_STR "min_fl_version" ///< minimum Foundry Local version required
254254
#define FOUNDRY_LOCAL_MODEL_PROP_PARENT_URI_STR "parent_uri" ///< optional
255255
#define FOUNDRY_LOCAL_MODEL_PROP_TOOL_CALL_START_STR "tool_call_start" ///< optional tool call start marker token

sdk_v2/cpp/src/catalog/azure_catalog_models.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ std::optional<ModelInfo> CatalogModelToModelInfo(const CatalogLocalModel& cm) {
417417
info.int_properties[FOUNDRY_LOCAL_MODEL_PROP_FILESIZE_MB_INT] = bytes / (1024 * 1024);
418418
}
419419

420-
info.string_properties[FOUNDRY_LOCAL_MODEL_PROP_MODEL_PROVIDER_STR] = "AzureFoundry";
420+
info.string_properties[FOUNDRY_LOCAL_MODEL_PROP_MODEL_PROVIDER_STR] = "FoundryLocal";
421421

422422
// Parent model URI
423423
if (!parent_uri.empty()) {

sdk_v2/cpp/test/internal_api/azure_catalog_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ TEST(AzureCatalogClientTest, ParsesModelResponseCorrectly) {
255255
EXPECT_EQ(info.string_properties.at(FOUNDRY_LOCAL_MODEL_PROP_DISPLAY_NAME_STR), "Phi-4 Mini Instruct");
256256
EXPECT_EQ(info.int_properties.at(FOUNDRY_LOCAL_MODEL_PROP_SUPPORTS_TOOL_CALLING_INT), 1);
257257
EXPECT_EQ(info.string_properties.at(FOUNDRY_LOCAL_MODEL_PROP_MIN_FL_VERSION_STR), "0.3.0");
258-
EXPECT_EQ(info.string_properties.at(FOUNDRY_LOCAL_MODEL_PROP_MODEL_PROVIDER_STR), "AzureFoundry");
258+
EXPECT_EQ(info.string_properties.at(FOUNDRY_LOCAL_MODEL_PROP_MODEL_PROVIDER_STR), "FoundryLocal");
259259
EXPECT_EQ(info.int_properties.at(FOUNDRY_LOCAL_MODEL_PROP_MAX_OUTPUT_TOKENS_INT), 4096);
260260
EXPECT_EQ(info.int_properties.at(FOUNDRY_LOCAL_MODEL_PROP_FILESIZE_MB_INT), 4096); // 4GB → 4096 MB
261261
}

sdk_v2/cpp/test/internal_api/model_info_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ TEST(ModelInfoRoundTrip, AllMetadataFieldsSurviveRoundTrip) {
110110
original.string_properties[FOUNDRY_LOCAL_MODEL_PROP_LICENSE_STR] = "MIT";
111111
original.string_properties[FOUNDRY_LOCAL_MODEL_PROP_TASK_STR] = "chat-completion";
112112
original.string_properties[FOUNDRY_LOCAL_MODEL_PROP_MIN_FL_VERSION_STR] = "0.5.0";
113-
original.string_properties[FOUNDRY_LOCAL_MODEL_PROP_MODEL_PROVIDER_STR] = "AzureFoundry";
113+
original.string_properties[FOUNDRY_LOCAL_MODEL_PROP_MODEL_PROVIDER_STR] = "FoundryLocal";
114114
original.string_properties[FOUNDRY_LOCAL_MODEL_PROP_MODEL_TYPE_STR] = "ONNX";
115115

116116
// Reasoning fields
@@ -156,7 +156,7 @@ TEST(ModelInfoRoundTrip, AllMetadataFieldsSurviveRoundTrip) {
156156
EXPECT_EQ(restored.string_properties.at(FOUNDRY_LOCAL_MODEL_PROP_LICENSE_STR), "MIT");
157157
EXPECT_EQ(restored.string_properties.at(FOUNDRY_LOCAL_MODEL_PROP_TASK_STR), "chat-completion");
158158
EXPECT_EQ(restored.string_properties.at(FOUNDRY_LOCAL_MODEL_PROP_MIN_FL_VERSION_STR), "0.5.0");
159-
EXPECT_EQ(restored.string_properties.at(FOUNDRY_LOCAL_MODEL_PROP_MODEL_PROVIDER_STR), "AzureFoundry");
159+
EXPECT_EQ(restored.string_properties.at(FOUNDRY_LOCAL_MODEL_PROP_MODEL_PROVIDER_STR), "FoundryLocal");
160160
EXPECT_EQ(restored.string_properties.at(FOUNDRY_LOCAL_MODEL_PROP_MODEL_TYPE_STR), "ONNX");
161161

162162
// Reasoning fields

sdk_v2/cpp/test/sdk_api/cache_only_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class CacheOnlyTest : public ::testing::Test {
100100
{"version", version},
101101
{"alias", alias},
102102
{"uri", "azureml://registries/azureml/models/" + name + "/versions/" + std::to_string(version)},
103-
{"providerType", "AzureFoundry"},
103+
{"providerType", "FoundryLocal"},
104104
{"modelType", "ONNX"},
105105
{"task", task},
106106
{"publisher", publisher},

sdk_v2/cs/test/FoundryLocal.Tests/Utils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ private static List<ModelInfo> BuildTestCatalog(bool includeCuda = true)
273273
// Mirrors MOCK_CATALOG_DATA ordering and fields (Python tests)
274274
var common = new
275275
{
276-
ProviderType = "AzureFoundry",
276+
ProviderType = "FoundryLocal",
277277
Version = 1,
278278
ModelType = "ONNX",
279279
PromptTemplate = (PromptTemplate?)null,

sdk_v2/js/test/_fixtures/cacheOnlyManager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const FIXTURE_CATALOG = {
5858
version: 2,
5959
alias: "phi-4-mini-instruct",
6060
uri: "azureml://registries/azureml/models/phi-4-mini-instruct-generic-cpu/versions/2",
61-
providerType: "AzureFoundry",
61+
providerType: "FoundryLocal",
6262
modelType: "ONNX",
6363
task: "chat-completion",
6464
publisher: "Microsoft",
@@ -70,7 +70,7 @@ const FIXTURE_CATALOG = {
7070
version: 1,
7171
alias: "qwen2.5-0.5b-instruct",
7272
uri: "azureml://registries/azureml/models/qwen2.5-0.5b-instruct-generic-cpu/versions/1",
73-
providerType: "AzureFoundry",
73+
providerType: "FoundryLocal",
7474
modelType: "ONNX",
7575
task: "chat-completion",
7676
publisher: "Alibaba",

sdk_v2/js/test/audio-session.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ const FIXTURE_CATALOG = {
107107
version: 2,
108108
alias: "phi-4-mini-instruct",
109109
uri: "azureml://registries/azureml/models/phi-4-mini-instruct-generic-cpu/versions/2",
110-
providerType: "AzureFoundry",
110+
providerType: "FoundryLocal",
111111
modelType: "ONNX",
112112
task: "chat-completion",
113113
publisher: "Microsoft",
@@ -119,7 +119,7 @@ const FIXTURE_CATALOG = {
119119
version: 1,
120120
alias: "whisper-tiny",
121121
uri: "azureml://registries/azureml/models/whisper-tiny-generic-cpu/versions/1",
122-
providerType: "AzureFoundry",
122+
providerType: "FoundryLocal",
123123
modelType: "ONNX",
124124
task: "automatic-speech-recognition",
125125
publisher: "OpenAI",
@@ -131,7 +131,7 @@ const FIXTURE_CATALOG = {
131131
version: 1,
132132
alias: "no-task-fixture",
133133
uri: "azureml://registries/azureml/models/no-task-fixture-cpu/versions/1",
134-
providerType: "AzureFoundry",
134+
providerType: "FoundryLocal",
135135
modelType: "ONNX",
136136
// task intentionally omitted
137137
publisher: "Test",

sdk_v2/js/test/model.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ describeIfBuilt("Model (cache-only)", () => {
5858

5959
it("info preserves v1 compatibility fields with sane defaults", () => {
6060
const info = model.info;
61-
expect(info.providerType).toBe("AzureFoundry");
61+
expect(info.providerType).toBe("FoundryLocal");
6262
expect(typeof info.cached).toBe("boolean");
6363
expect(info.runtime).toBeDefined();
6464
expect(info.runtime?.deviceType).toBe(info.deviceType);

0 commit comments

Comments
 (0)