Skip to content

Add Vision Capability Deployment Support#82

Merged
MikeAlhayek merged 4 commits into
mainfrom
ma/add-vision-support
May 26, 2026
Merged

Add Vision Capability Deployment Support#82
MikeAlhayek merged 4 commits into
mainfrom
ma/add-vision-support

Conversation

@MikeAlhayek

@MikeAlhayek MikeAlhayek commented May 26, 2026

Copy link
Copy Markdown
Member

This pull request introduces a significant refactor to the AI deployment abstractions, shifting from the legacy AIDeploymentType enum to a new, more descriptive AIDeploymentPurpose enum. The changes improve clarity, future-proof the codebase, and maintain backward compatibility through obsoleted members and extension methods. Several APIs and model properties have been updated to use the new AIDeploymentPurpose, and extension methods are provided for interoperability between the old and new representations.

Key changes include:

Migration from Type to Purpose

  • Introduced the new AIDeploymentPurpose enum in AIDeploymentPurpose.cs, which replaces the legacy AIDeploymentType for describing deployment roles (e.g., Chat, Utility, Embedding, etc.). ([src/Abstractions/CrestApps.Core.AI.Abstractions/Models/AIDeploymentPurpose.csR1-R49](https://github.com/CrestApps/CrestApps.Core/pull/82/files#diff-0ec58ffb9aa1ea75ec0ab648c3523a210ea812ded130d7cd05462e83185716abR1-R49))
  • Updated the AIDeployment model to use a Purpose property instead of Type, with backward compatibility for serialization and legacy consumers. ([[1]](https://github.com/CrestApps/CrestApps.Core/pull/82/files#diff-dc9de313d581360506c860924ab9fffe60f547bc98903c434c0862fab4177829L8-R14), [[2]](https://github.com/CrestApps/CrestApps.Core/pull/82/files#diff-dc9de313d581360506c860924ab9fffe60f547bc98903c434c0862fab4177829L60-R96))
  • Added extension methods in AIDeploymentPurposeExtensions.cs for purpose support checks, validation, and conversion between legacy types and new purposes. ([src/Abstractions/CrestApps.Core.AI.Abstractions/Models/AIDeploymentPurposeExtensions.csR1-R73](https://github.com/CrestApps/CrestApps.Core/pull/82/files#diff-e2559de9293a3f489f53c111edab8dc6f5ab3b0101931f4cbf632946cebdf03aR1-R73))

API and Interface Updates

  • Refactored the IAIDeploymentManager interface to use AIDeploymentPurpose in all relevant methods, with [Obsolete] legacy overloads retained for compatibility. New methods include GetByPurposeAsync, GetDefaultAsync (by purpose), ResolveOrDefaultAsync (by purpose), and GetAllByPurposeAsync. ([src/Abstractions/CrestApps.Core.AI.Abstractions/Deployments/IAIDeploymentManager.csL25-R100](https://github.com/CrestApps/CrestApps.Core/pull/82/files#diff-31b8cbbe0ecd579a30c41db6a84c4970f9371a1f5a6af206be577f9c8f415be5L25-R100))
  • Updated XML documentation comments throughout to reflect the migration from "type" to "purpose". ([src/Abstractions/CrestApps.Core.AI.Abstractions/Deployments/IAIDeploymentManager.csL25-R100](https://github.com/CrestApps/CrestApps.Core/pull/82/files#diff-31b8cbbe0ecd579a30c41db6a84c4970f9371a1f5a6af206be577f9c8f415be5L25-R100))

Extension and Helper Methods

  • Updated extension methods in AIDeploymentManagerExtensions.cs to use AIDeploymentPurpose instead of AIDeploymentType, and provided [Obsolete] overloads for legacy code. ([[1]](https://github.com/CrestApps/CrestApps.Core/pull/82/files#diff-193f66fce5ef221ea4a3b99d9a55d03d6eceb1a26605496aef766df85fa5be1bL26-R30), [[2]](https://github.com/CrestApps/CrestApps.Core/pull/82/files#diff-193f66fce5ef221ea4a3b99d9a55d03d6eceb1a26605496aef766df85fa5be1bL39-R70))

Solution File and Project Organization

  • Cleaned up and reordered projects in CrestApps.Core.slnx for clarity and to reflect the updated structure. No functional impact, but improves maintainability. ([[1]](https://github.com/CrestApps/CrestApps.Core/pull/82/files#diff-d8b81c3dffccaf127b79a4744b8cda0b510c128b8138ea018669a404c01cad65R23-R49), [[2]](https://github.com/CrestApps/CrestApps.Core/pull/82/files#diff-d8b81c3dffccaf127b79a4744b8cda0b510c128b8138ea018669a404c01cad65R59-L57))

Backward Compatibility and Serialization

  • Ensured backward compatibility in the AIDeployment model by retaining the Type property (now [Obsolete]), and by providing custom JSON property handling for legacy fields. ([src/Abstractions/CrestApps.Core.AI.Abstractions/Models/AIDeployment.csL60-R96](https://github.com/CrestApps/CrestApps.Core/pull/82/files#diff-dc9de313d581360506c860924ab9fffe60f547bc98903c434c0862fab4177829L60-R96))
  • Provided conversion logic between legacy and new enums, and ensured all APIs can interoperate during the transition period. ([[1]](https://github.com/CrestApps/CrestApps.Core/pull/82/files#diff-e2559de9293a3f489f53c111edab8dc6f5ab3b0101931f4cbf632946cebdf03aR1-R73), [[2]](https://github.com/CrestApps/CrestApps.Core/pull/82/files#diff-dc9de313d581360506c860924ab9fffe60f547bc98903c434c0862fab4177829L92-R141), [[3]](https://github.com/CrestApps/CrestApps.Core/pull/82/files#diff-dc9de313d581360506c860924ab9fffe60f547bc98903c434c0862fab4177829L112-R156), [[4]](https://github.com/CrestApps/CrestApps.Core/pull/82/files#diff-d2085e7f50a9df109f3193f0a5cdce599a4de2da4839593aab54871893598118L4-R8))

These changes modernize the deployment abstraction layer, making it more expressive and maintainable, while providing a clear migration path for existing consumers.

@github-actions

Copy link
Copy Markdown

This pull request has merge conflicts. Please resolve those before requesting a review.

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