Skip to content

[Bug] Backward compatibility for model list #454

@leonardmq

Description

@leonardmq

Describe the bug

Bug: modifying an enum (such as ModelProviderName in KilnModelProvider) breaks older clients (running in older releases).

What happens is:

  • field in KilnModelProvider in ml_model_list is modified
  • older client updates the list of models from remote config; tries to overwrite its current list
  • Pydantic raises an exception because the serialized model in the remote config does not match the older client's KilnModelProvider class

This happens if we update an enum in the KilnModelProvider - such as when we add a new provider or alter an existing enum because providers support some new values.

Fix

  • Update the remote config parser to iterate the loop manually, catch issues with any one item and only ignore it, not everything. Update it to return error_count and use that in this test case. That way we can add new values to enums, but unsupported values are ignored. Better typing all round. No min_version.
  • Update the remote_config URL to _v2 in next release with silicon flow and point to that. Publish V1 and _v2, V1 strips unknown providers. Can drop V1 in 6 months or so.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions