Skip to content

Migrating from OpenMed 4.0 to 4.1

OpenMed 4.1.0 is not published yet. This guide collects each change that needs a migration note as it lands. The changelog lists every change since 4.0.

Python

GraphQL span type

openmed.service.graphql_schema.OpenMedSpanType is now built from the canonical span schema when the module loads, so its fields cannot drift from span.schema.json. The GraphQL type is still named OpenMedSpan, and the Python class keeps the 4.0 fields, keyword-only constructor and from_mapping. No migration is needed. Tools that read the source without importing it no longer see a class statement, so they report the class and these members as changed: openmed.service.graphql_schema.OpenMedSpanType.action, openmed.service.graphql_schema.OpenMedSpanType.canonical_label, openmed.service.graphql_schema.OpenMedSpanType.detector, openmed.service.graphql_schema.OpenMedSpanType.doc_id, openmed.service.graphql_schema.OpenMedSpanType.end, openmed.service.graphql_schema.OpenMedSpanType.entity_type, openmed.service.graphql_schema.OpenMedSpanType.evidence, openmed.service.graphql_schema.OpenMedSpanType.from_mapping, openmed.service.graphql_schema.OpenMedSpanType.label, openmed.service.graphql_schema.OpenMedSpanType.metadata, openmed.service.graphql_schema.OpenMedSpanType.policy_label, openmed.service.graphql_schema.OpenMedSpanType.regulatory_tags, openmed.service.graphql_schema.OpenMedSpanType.replacement, openmed.service.graphql_schema.OpenMedSpanType.reversible_id, openmed.service.graphql_schema.OpenMedSpanType.schema_version, openmed.service.graphql_schema.OpenMedSpanType.score, openmed.service.graphql_schema.OpenMedSpanType.section, openmed.service.graphql_schema.OpenMedSpanType.start, openmed.service.graphql_schema.OpenMedSpanType.text, openmed.service.graphql_schema.OpenMedSpanType.text_hash.

OpenMedKit for Android

OpenMedKit Android commits its public API baseline at android/openmedkit/api/openmedkit.api. The changes below alter a recorded declaration without breaking callers. They are source-compatible for Kotlin and binary-compatible: apps and libraries compiled against 4.0 keep linking without a rebuild.

Model catalog family, task and labels

ModelCatalogEntry gains family, task and canonicalLabels, read from the bundled catalog, and ModelCatalog.filter can select a model family. See List available models.

Symbol Change Migration
com.openmed.openmedkit.catalog.ModelCatalog.filter Adds a trailing family: String? = null. The 4.0 five-argument filter stays as a hidden bridge for compiled callers None for Kotlin. Java sources pass null for family
com.openmed.openmedkit.catalog.ModelCatalogEntry.copy Adds family, task and canonicalLabels, all defaulted. The 4.0 seven-argument copy stays as a hidden bridge that keeps the new fields None for Kotlin. Java sources pass the entry's getFamily(), getTask() and getCanonicalLabels()

The seven-argument ModelCatalogEntry constructor is unchanged and leaves the new fields empty. A catalog asset built before 4.1 still loads, with family and task null and canonicalLabels empty.