Repository navigation
refactor: finish the 0.14.0 removals (#919) - #1656
Conversation
2b8a13c to
57d875f
Compare
The reasoning capability table, the decision converter's output formats, the gateway's stream, preflight and SSE dispatch, the example gateway config, the benchmarks and the live scripts all spelled a provider by a name that the retired-names table now rejects (openai_chat, openai_responses, anthropic, google). Spell each one with the format it meant, so the alias tables can be deleted without leaving a user behind. Persisted data keys (provider_metadata tags, usage rows) are untouched.
) Tests passed openai_chat, openai_responses, anthropic and google as provider arguments, shim values and parametrize ids. Use chat_completions, open_responses (or the openai--open_responses profile shim where the test relies on its traits), messages and google_generate, and name a gateway provider key by the format it stands for. Persisted data in the telemetry and persistence tests is left as it was.
Delete llm_rosetta.provider_names: LEGACY_PROVIDER_ALIASES, LEGACY_SHIM_ALIASES, canonical_provider_name, canonical_shim_name, normalize_provider_name, warn_legacy_provider_names, warn_legacy_shim_names and legacy_names, with their exports from llm_rosetta, llm_rosetta.api and llm_rosetta.fidelity, and the legacy members of the ProviderType literal. A retired name now fails through the retired-names table, naming its replacement, at the library boundaries (get_converter_for_provider, ConversionPipeline, convert, convert_response, the embedding converters, ProviderShim, shim.yaml formats) and in the gateway config. The gateway no longer rewrites such a name on load: maintenance.names keeps only the guard, and the config.correct_legacy_names load step is gone. retired_names.ALIASES_ENABLED now switches the model_type rows only (embedding, decision, still translated until their own removal); provider-type and shim rows always raise. The golden recording of the alias behaviour and test_provider_name_alias are replaced by tests that assert the error and the replacement it names for every row of the table, in the library and through the config loader. The boundary test's allowlist loses the eight pairs that named the module.
Remove the 0.13 legacy surface of the shim layer that no in-repo or standalone shim repo reads. ProviderShim rejects the removed keywords base, from_transforms, to_transforms and the flat connection and tool keywords with a TypeError that names the replacement, and drops the matching read-only properties and the unused type aliases. The loader refuses a provider.yaml that declares base: or a flat connection or tool key, and a transforms.py that exports from_transforms or to_transforms, with a message that names the replacement; the flat spellings are gone from provider.schema.json. Delete resolve_base, the llm_rosetta.shims.transforms forwarder, ir.tools fix_orphaned_tool_calls_ir and the GoogleInteractions ir_function_* aliases. Kept because a reader remains: ProviderShim.base (gateway admin payload, alcf, asksage and opencode-free tests), ProviderShim.default_path (gateway typed-route resolver) and ProviderShim.max_tool_description_length (argo test). Related to #919.
A one-shot command that rewrites retired provider, shim and model-type names in a gateway config (text-level, comments and layout preserved), rewrites the persisted legacy tags in gateway.db, and scans source for retired names. It reads llm_rosetta.retired_names only, so it keeps working after the alias tables are gone. Refs #919.
… command (#919) retired_name_message now ends with "run 'llm-rosetta-migrate --config <path>' (add --write to apply), see the migration guide" (retired_names.MIGRATE_HINT). The gateway's config guard (maintenance.names) returns that message unchanged instead of appending a documentation link, so the library boundaries and the config loader answer the same way.
…oader does (#919) The admin shim-files route still read and accepted a provider.yaml that declares base:, which the core loader has rejected since the ProviderShim deprecations were removed. The editor now validates a saved definition with llm_rosetta.shims.providers.validate_shim_declaration, the loader's own check, so both refuse it with the same message and a retired or missing format fails the same way in both.
Delete LEGACY_MODEL_TYPES, canonical_model_type and legacy_model_type, and the retired_names.ALIASES_ENABLED switch: every row of the retired-names table now raises. Each boundary that reads a model type from outside answers a retired spelling with its replacement and the llm-rosetta-migrate command: the typed converter registry and pipelines, ProviderShim(model_type=...), a provider.yaml model_type and its embedding: section, the usage readers, the fidelity checker, and in the gateway the models and capabilities in the config, the ?type= filter (HTTP 400) and the admin model editor. The gateway config loader no longer reads the pre-rename keys: embedding_providers, embedding_models, default_embedding_format, a provider's embedding_format, embedding_path, embedding_shim, embedding_enabled and its embedding: block, and the decision equivalents. They fail at load naming the key that replaces each (retired_names.retired_key_message); the admin payload no longer folds them into the panel's keys. The versioned config migrations are unchanged in effect. They upgrade documents older than the current config_version and read their historical spellings through the retired-names table; a document already at the current version that spells a retired name is rejected. The sections spelled with the current names (embeddings_providers, rerank_providers) stay readable.
…_SHAPES (#919) openai_chat, openai_responses, anthropic and google leave STANDARD_SHAPES and ADDITIVE_CACHE_STANDARDS, so the usage vocabulary names the current standards only. llm-rosetta-migrate --db rewrites the stored tags. A row that was not migrated is unknown to the table: shape_for answers None and cache_is_additive answers False, so the startup total repair leaves its total as the old writer stored it. The gateway does not refuse to start over statistics; backfill_total_tokens instead counts the rows that carry a retired tag and logs one warning that names the tags and the migrate command. The behaviour is tested (tests/gateway/test_retired_tags_in_the_ledger.py).
…d up to date (#919) llm_rosetta.gateway and the llm_rosetta.observability finder stay, and now say only that they are deprecated and will be removed in a later release, in the module text and in the warning. No source line names 0.16.0 or the removal issue any more; the shim-removal tooling's own examples use 0.20.0. AGENTS.md drops provider_names.py and the shims transforms forwarder from the module table, describes retired_names.py (an error table, never an alias) and the llm-rosetta-migrate console script, and no longer says the model-type aliases are accepted.
tests/test_no_deprecation_bounds.py walks the source of both distributions (_vendor excluded) and fails on a DeprecationWarning outside a short, reasoned list of kept deprecations, on a line that names 0.16.0 or the removal issue, on a module that is only re-exports and a warning, and on any removed module, symbol or acknowledged public removal that imports again. Both lists shrink only; each entry carries its reason. llm_rosetta.converters.base.tools and .helpers also get a literal __all__ assertion that pins all their current names, so the package-level API that replaced the removed submodule facades cannot change unnoticed.
… name (#919) A config that still spelled a retired name failed at start with a bare ValueError that said what the name became but not where it was. Config loading now raises RetiredConfigName, a ValueError subclass, whose message reads "<config file>: <json path>: <retired-names message>" and still ends with the llm-rosetta-migrate hint. The json path is models.<name>.capabilities[<i>], models.<name>.type, providers.<name>.type or .shim, providers.<name> for a key read as a name, providers.<name>.<key> for a retired endpoint key, or the top-level key. llm-rosetta-gateway (and the credential subcommand) print it as one line, "llm-rosetta-gateway: error: ...", with no traceback, and exit 1.
…retired (#919) --scan flagged google_generate as a retired shim and openai as a shim, although both are current: google_generate is a format, and a bare openai is a vendor word. With no slot to read, the scan now keeps only strings that are retired wherever they appear: names that are current formats are left out, and so are bare retired shim names (google and anthropic are still found as retired provider types). --config reads slots and is unchanged; so is --db. A file of current names yields no finding and exit 0; a file of old names beside current ones yields findings for the old ones only.
…ovider tag (#919) A typed request was logged under its model type, so request_log and error_dumps carry the retired value "embedding" in source_provider and target_provider, and metrics.counters.by_source_provider has an "embedding" key. --db now rewrites the value to "embeddings" in the four columns and folds the counter into "embeddings" (sum), reading the pair from the retired-names model-type rows, not from a copied literal. A by_target_provider key "embedding" is reported, not rewritten, like the other target keys. request_log.model_type is unchanged and the rewrite stays idempotent. The gateway's startup warning (backfill_total_tokens) counts these rows too, so an unmigrated database is told about them.
…#919) leaf_connection (llm_rosetta.api) and the admin manifest editor's leaf reader were written against a loader that still read the flat connection keys (default_base_url, base_url at the top of a provider.yaml). The ProviderShim and provider.yaml deprecations removed them, so a leaf now declares its connection in the connection: block only. Pin that in the two helpers' tests and in the docstring.
…nd the docs-build fix for #1656 Drop the resolve_base API entry that no longer exists, nest the flat shim spellings, and stop describing the retired-name aliases as live. Changelog entries for #1648, #1653 and the P5-P8 removals plus llm-rosetta-migrate; migration guide rows, migrate section and upgrade recipe; the core surface section on the API index.
47fe04b to
69bbe79
Compare
There was a problem hiding this comment.
Checked at 69bbe79e, in the order you asked.
(1) P5 is what it says. llm_rosetta.provider_names is gone; a retired provider type, model type or shim name raises from the real entry point with the replacement and the sentence ends with the command. I ran get_converter_for_provider on openai_chat, anthropic, openai-responses; formats_for('embedding') and get_converter_class('decision', ...); ConversionPipeline(source_shim=...) on openai and alcf--metis (the latter also names the standalone package and the shims.presets key). A bare format passed as a shim is still accepted, which is the documented choice.
(2) P7 locates the name: provider key, type:, embedding_format, capabilities[0] and a top-level embedding_providers each come back as RetiredConfigName with <file>: <json path>: ... and the replacement. The CLI path prints one line (_exit_with_config_error) and exits 1.
(3) The migrate tool, measured rather than read. Config: five rewrites, comments kept byte-for-byte (including a comment that uses the word "embedding" and a trailing // note), a .bak written, second run 0 rewrites, --check 3 before and 0 after. It leaves free text alone: upstream_model: "openai_chat" is reported as "a place this tool does not rewrite" rather than rewritten. DB: I could not re-run your 268k-row file (no gateway DB on this machine), so I built one from the gateway's own schema with 334 request_log rows and 25 error_dumps rows: after --write, row counts identical, token sums identical (75088/60122/135210), a hash over id, timestamp, model, status, duration, the four token columns and request_id identical, tags rewritten, .bak written, by_source_provider folded (12 + 5 into 45 chat_completions), second run 0 rewrites. Atomicity: with a BEFORE UPDATE trigger aborting on error_dumps, the run exits 2 and request_log is untouched — the whole migration is one transaction, as claimed.
(4) P8. STANDARD_SHAPES is now derived from FORMAT_SPECS; no retired key is in it and shape_for('openai_chat') is None. An unmigrated DB logs 334 request_log rows carry a retired provider tag (...); ... run 'llm-rosetta-migrate --db <data dir>' and create_app builds. On "served, not refused" I agree: failing to start would strand an operator who cannot read their own usage until they have run a tool they may not yet have, and the warning carries the count and the command. I could not get an HTTP response to confirm the serving half, because fastapi and the ASGI stack are not installed in this environment, so the evidence there is that the app object builds and the persistence migrations run.
(5) P6. base, default_path and max_tool_description_length are read-only properties, equal to format, connection.default_path and tools.max_description_length, emit no warning, and no other deprecated shim attribute is left.
(6) P9. tests/test_no_deprecation_bounds.py 57 passed, and it bites: a # TODO before 0.16.0 line in a source file fails test_no_deadline_is_written_into_source, and a new unlisted warnings.warn(..., DeprecationWarning) fails test_only_the_kept_deprecations_warn. Reading removed names from public_api_allowlist.json instead of a second list is the right call.
Four notes, none blocking.
The body says api is 64 names; it is 62. __all__ goes 68 to 62, which is seven removed (canonical_model_type, canonical_provider_name, canonical_shim_name, legacy_model_type, legacy_names, warn_legacy_provider_names, warn_legacy_shim_names) and one added (validate_shim_declaration). 64 is the max_count ceiling in tests/test_public_api.py. The release note should quote 62, or the ceiling should be tightened to 62 so the two stops drifting. On SURFACE_VERSION staying 1: api.py does not exist at v0.13.0, so every name it has or had is unreleased and no bump is owed.
A retired top-level section holding a list crashes instead of explaining: embedding_providers: [...] gives AttributeError: 'list' object has no attribute 'items' from reject_retired_sections, because the section body is iterated before the section name is checked in the second loop. A dict value gives the correct message. Guarding on if section in raw before touching the value, or checking isinstance(..., dict), would keep the promise that a retired key always gets the migrate message.
--scan labels names it can rewrite as unmapped. On a config --config rewrites cleanly, --scan prints UNMAPPED 'openai_chat': use chat_completions per occurrence and exits 1. As a pre-check for files the tool does not understand that is fine, but on the config itself it reads as a failure where the tool would have succeeded; skipping files also passed to --config, or wording the finding as a textual mention, would remove the contradiction.
A completed DB migration still exits 1 forever, because by_target_provider always keeps at least one retired key and that is reported as unmapped. Exit 2 is the failure code, 3 is config-pending, and 1 currently means both "needs a person" and "did not finish", which is the one an operator scripting --write && restart will trip over. Either exit 0 with the warning when the only remaining items are the deliberately-left ones, or give "needs a person" its own code.
Tests: tests/test_public_api.py, test_migrate_0140.py, test_retired_config_location.py, test_retired_names_config.py, test_retired_tags_in_the_ledger.py, test_removed_submodule_facades.py 217 passed 4 skipped; tests/converters plus test_tool_ops.py and test_ir_compat_shims.py 4031 passed 3 skipped. I did not run tests/integration, and I did not start a live gateway.
There was a problem hiding this comment.
Verified at 69bbe79edd (base 5d8ac0ba, 15 commits, 197 files). CI: 14 success, 2 skipped (both pure-move); both docs-build jobs green, and the two docs commits (e0deef707d, 00362cab43) are in this repo.
One number in the description is off. llm_rosetta.api.__all__ is 62, not 64, and SURFACE_VERSION is 1. Against #1653's head the seven names that left are canonical_model_type, legacy_model_type, canonical_provider_name, canonical_shim_name, legacy_names, warn_legacy_provider_names, warn_legacy_shim_names — 68 minus seven is 61, so one name came back in the same window; whatever the count should be, 64 does not describe this tree. If the surface page repeats the number, it needs the same fix.
Keeping SURFACE_VERSION at 1 is right. packages/llm-rosetta/src/llm_rosetta/api.py does not exist in v0.13.0, so no release ever carried those names and no host can be pinned to them.
(1) P5. provider_names.py is gone, and check_not_retired raises ValueError: 'openai_chat' was renamed to 'chat_completions' in 0.14 and the old spelling is no longer accepted (use 'chat_completions'); run 'llm-rosetta-migrate --config <path>' (add --write to apply), see the migration guide. It is wired at eight sites: config/parse.py, config/resolve.py, providers.py, auto_detect.py, converters/embeddings/pipeline.py, and three in converters/registry.py.
(2) P7. RetiredConfigName names the file and the JSON path down to the array index:
/tmp/mig/bad.jsonc: models.m.capabilities[0]: 'embedding' was renamed to 'embeddings' in 0.14 and ...
(3) The migrate tool, config side. On a jsonc with a line comment, a block comment and an inline comment after the value, --write changed exactly one line — "openai_chat" to "chat_completions" — and every comment survived byte for byte. It reports config.jsonc:6 [providers.p.type], writes config.jsonc.bak, and a second --write reports 0 rewrite(s). I could not reproduce the DB half: I have no 268k-row gateway.db, so the row counts, token sums and column checksums are your measurement, not mine. The -k 'migrate or retired or deprecation_bounds' selection passes here (542 passed, 7 skipped).
(4) P8. The retired rows are gone from STANDARD_SHAPES, shape_for answers None for them, and the gateway counts them with SELECT COUNT(*) ... WHERE target_provider IN (...) OR source_provider IN (...) and logs a warning naming the command — it does not raise (observability/persistence/usage.py:114-150). Serving is the right call: the data is reporting-only, and refusing to start would turn a bookkeeping gap into an outage. I agree with the decision.
(5) P6. base, default_path and max_tool_description_length are property objects without setters — read-only, confirmed. They emit no warning. That is consistent with P9's gate (KEPT_DEPRECATIONS would have to name them), but it does mean the word "deprecated" now lives only in their docstrings: nothing will tell a shim author to stop using them, and the next removal will be a surprise. If that is the intent, fine; if not, the three need a line in the migration guide at least.
(6) P9 exists and passes, including the completeness sweep.
Not verified by me: tests/integration, a live gateway on a migrated config beyond /health, and the DB migration on real data.
Comment only — merge is yours.
There was a problem hiding this comment.
Reviewed at 69bbe79e. CI green (14 success, 2 skipped). Comment only; the merge is yours.
(1) P5, the alias tables. provider_names.py is gone (323 lines), no LEGACY_*_ALIASES table survives, and retired_names is 31 rows over three kinds. Measured at the boundaries: type: openai_chat -> providers.p1.type, shim: openai -> providers.p1.shim, capabilities: ["embedding"] -> models.m.capabilities[0], each a RetiredConfigName whose text names the replacement and carries the migrate hint; a typo gets no hint at all. The preset variant is complete too (argo--openai_chat names shims.presets: ['argo']). Runtime is covered as well: ProviderShim(format=...) with a retired model type raises, and ProviderShim(base=...) still fails with the message naming the rename.
(2) P7, the config guard. It is version-gated exactly as the guide says, and I measured both sides. With config_version: 5, embedding_format, embedding_providers, embedding_shim and a nested embedding: block all raise RetiredConfigName naming the file and the JSON path; below the current version the versioned migrations rewrite them and the file is written back. One gap, inline: a retired shim name in a face key is not checked. providers.p1.embeddings_shim: "openai" loads at both config versions, the embeddings endpoint is silently disabled (embeddings_shim names unknown shim 'openai'), and the user gets no rename message - while shim: openai on the same provider raises. llm-rosetta-migrate --config does rewrite that value to openai--chat_completions, so this only bites the user who skips the tool, which is the case the guard exists for.
(3) The migrate tool. Config: the dry run leaves the file byte-identical and --check exits 3; --write rewrites only the value spans - 11 comment markers and the layout survive - writes .bak, and a second --write reports 0 rewrites with the file hash unchanged. Database: on a 268,000-row gateway.db built from the real schema (5,000 error dumps, counters document), the dry run leaves the file hash identical; --write does 10 rewrites and 1 unmapped in 1.13 s and leaves a .bak holding the pre-migration rows (334 embedding, 0 embeddings). After it: row counts 268,000 / 5,000, SUM(total_tokens) 200,616,000, SUM(duration_ms) unchanged, and the sha256 of every untouched column identical for both tables; 334 embedding -> embeddings, 500 model_type -> embeddings, every legacy tag gone, the by_source_provider counters folded (260120 / 3040 / 334). A second --write is 0 rewrites with an identical file hash. A holder process makes --write refuse with its PID and the --force escape; --force then fails with database is locked and the rows stay untouched, which is the right outcome but reads as a bare sqlite error.
(4) P8. STANDARD_SHAPES is down to four (chat_completions, messages, open_responses, google_generate), no embedding/decision shape. I agree with served-and-warn rather than refused: a gateway on the unmigrated DB answers /health 200 and /admin/api/metrics 200, and logs one warning naming the count (500 in my fixture) and the command. That warning lives in backfill_total_tokens, so it arrives with the deferred startup step - measured after the step ran, none at the second the port opened.
(5) P6. The three properties are read-only (FrozenInstanceError on assignment), base equals format, and the removed keyword is not silently swallowed: ProviderShim(base=...) raises no longer accepts base (removed in 0.14.0): base= -> format.
(6) P9. tests/test_no_deprecation_bounds.py: 57 passed. A new DeprecationWarning in a source file fails 1; silencing the kept llm_rosetta.gateway warning fails 1; a 0.16.0 deadline in a comment fails 1. Scratch: SURFACE_VERSION is 1, and api.__all__ is 62 names - the test's ceiling is 64, so two additions would not need the file touched; pinning it to 62 would make the count load-bearing.
Suites: tests/gateway 4096 passed; the migrate / retired-name / api / gate files 461 passed. Docs on docs_en and docs_zh carry the guide, the changelog and the surface page, and the guide's version-gate sentence matches what I measured; its verification paragraph pins 47fe04b2ea rather than this head.
Two body-level notes, neither blocking.
First, the load-time maintenance rewrites the config before the refusal lands: on a config with a retired type:, load_gateway_config rewrote the file (comments and layout dropped, .pre-migration.bak written) and then raised. So the first gateway start destroys the comments that llm-rosetta-migrate would have kept, and only then tells the user to run it. Master rewrites for its own steps too, so this is not new - but the ordering means the advice in the guide arrives after the damage.
Second, --check is not yet a "the config is current" gate. The tool emits the flat embeddings_format spelling, the load-time step folds it into an embeddings: {format, path} block, so a config that passes --check is rewritten again by the first load (measured: file hash changes and the remaining comments go). Making the tool emit the shape the loader wants would let --check stand for something.
| # the config (and a file-backed one is rewritten on disk), logging | ||
| # each rewrite at INFO. Only a legacy provider *key* still warns: | ||
| # keys are user identifiers and are not rewritten. | ||
| # ``shim:`` / ``type:`` values were checked above; a provider *key* |
There was a problem hiding this comment.
The retired check covers shim: and type: values and the bare provider key, but not the per-face shim values this loop resolves: embeddings_shim, decisions_shim, and whichever face keys a descriptor declares.
Measured: providers.p1.embeddings_shim: "openai" (and "openai_chat") loads at config_version: 5 with no RetiredConfigName. The endpoint is just disabled with embeddings_shim names unknown shim 'openai' — the same silent outcome as a missing base_url — and the user gets neither the rename nor the migrate hint. shim: "openai" on the same provider raises, so two spellings of the same mistake behave differently.
llm-rosetta-migrate --config does rewrite these values, so the guard only matters for someone who skips the tool, which is exactly who needs it. Running check_not_retired(value, retired_names.SHIM) on each resolved face shim value where it is read would close it.
…gs it rewrites A by_target_provider key the tool leaves on purpose is now a note: printed, listed under 'notes' in the --json report, and not counted in the exit code, so a finished --db migration exits 0. --scan findings are advisory mentions instead of UNMAPPED, and files also passed as --config targets in the same run are skipped.
… their replacements
… with its location
load_gateway_config held the load-time migration write-back until the document was accepted, so a retired name raises before the file is rewritten and no .pre-migration.bak is made.
…e first load The tool now stamps config_version when the gateway's load-time steps would change nothing else, and reports a load-time migration it cannot run as pending (exit 3 under --check).
…ProviderShim properties, load-time guards)
…ProviderShim properties, load-time guards)
Tracking issue: #919 (the removals ship in 0.14.0, version stays 0.14.0). This draft collects the removal steps as atomic commits; rebase-merge keeps them. It does not close the issue.
llm-rosetta-migrate(cherry-picked from feat(gateway): llm-rosetta-migrate for the 0.14.0 name removals (#919) #1655, message kept)embedding/decisionmodel-type spellings and their config keysSTANDARD_SHAPES__all__pinCommits (23 on top of origin/master
5d8ac0bad5, which is #1653): repoint in-repo users; repoint tests; remove the provider and shim aliases; P6; migrate tool; migrate hint on every retired-name error; admin shim editor refusesbase:; P7; P8; wording and AGENTS.md; completeness gate; follow the flat connection removal in the manifest-text helpers; config errors name the file and key;--scanskips current names;--dbrewrites theembeddingprovider tag.A retired name in a config now raises
RetiredConfigName(aValueError) whose message is<config file>: <json path>: <retired-names message>, for examplemodels.m.capabilities[0],providers.p.typeorproviders.p.embedding_format;llm-rosetta-gatewayprints it as onellm-rosetta-gateway: error: ...line with no traceback and exits 1.llm-rosetta-migrate --scankeeps only strings that are retired wherever they appear: current formats (google_generate,google_interactions) and bare shim words (openai,google,anthropicas shims) are no longer reported;--configis unchanged.llm-rosetta-migrate --dbalso rewrites the valueembeddingtoembeddingsinrequest_loganderror_dumpssource_provider/target_providerand foldsmetrics.counters.by_source_provider['embedding']intoembeddings(read from the retired-names model-type rows); aby_target_providerkeyembeddingis reported only.request_log.model_typeis unchanged, and the gateway's startup warning counts rows that still carry the tag. On a copy of a production-sized database (268275request_logrows, 775error_dumpsrows) the 334embeddingrows becameembeddingsin both columns, with row counts, token sums, a checksum of the untouched columns andintegrity_checkunchanged, and a second run wrote nothing.Every retired-name error now ends with
run 'llm-rosetta-migrate --config <path>' (add --write to apply), see the migration guide(retired_names.MIGRATE_HINT), including the gateway config guard.The admin shim editor validated a saved
provider.yamlwith its own check and still acceptedbase:. It now callsllm_rosetta.shims.providers.validate_shim_declaration, the loader's own check, so both refuse the same input with the same message.P7 deletes
LEGACY_MODEL_TYPES,canonical_model_type,legacy_model_typeandretired_names.ALIASES_ENABLED. A retired model type fails at the typed registry and pipelines,ProviderShim(model_type=...), aprovider.yamlmodel_typeand itsembedding:block, the usage readers, the fidelity checker, configtype:andcapabilities:, the admin model editor and?type=on/models(HTTP 400 with the replacement). The config loader no longer readsembedding_providers,embedding_models,default_embedding_format, a provider'sembedding_format/embedding_path/embedding_shim/embedding_enabledor itsembedding:block (nor thedecisionequivalents); each fails at load naming the key that replaces it. Decision to review: the versionedconfig_versionmigrations still upgrade documents older than the current version (they read their historical spellings through the retired-names table), so only a document already at the current version is rejected for an old spelling, and the sections spelled with the current names (embeddings_providers,rerank_providers) stay readable.P8 decision: rows written under a retired tag are not misread silently and not fatal.
STANDARD_SHAPESno longer lists them (shape_foranswersNone,cache_is_additiveFalse), so the startup total repair leaves such a row as the old writer stored it, andbackfill_total_tokenslogs one warning with the count, the retired tags andllm-rosetta-migrate --db. Refusing to start over statistics would block serving for a cosmetic loss, so it degrades with a warning; the behaviour is tested intests/gateway/test_retired_tags_in_the_ledger.py.P9:
tests/test_no_deprecation_bounds.pywalks both distributions (_vendorexcluded) and fails on aDeprecationWarningoutside a reasoned list, a line naming0.16.0or#919, a module that is only re-exports and a warning, and a removed path, symbol or acknowledged public removal that imports again.llm_rosetta.gateway(C01), thellm_rosetta.observabilityfinder (C02) and the[gateway]extra (C22) stay; their text says "deprecated, removed in a later release" with no version.converters.base.toolsand.helpershave a literal__all__pin. Open item for the maintainer:llm_rosetta/types/ir/extensions.pyis a deprecated forwarder (shipped in 0.13.0, outside the inventory) that the gate lists as a kept shell.Rebased on #1653:
llm_rosetta.apinow has 62 names (68 minus the seven removed names, plusvalidate_shim_declaration;EXPECTED_EXPORTSandmax_countare pinned at 62). The names this branch removes from it (canonical_provider_name,canonical_shim_name,legacy_names,warn_legacy_provider_names,warn_legacy_shim_names,canonical_model_type,legacy_model_type) were added toapiduring the 0.14.0 cycle and appear in no release, and the gateway no longer uses any of them.SURFACE_VERSIONtherefore stays at 1: no released surface changed, and the rule (rise on a removal or changed meaning of a released name) is not triggered.validate_shim_declarationis the one name added.leaf_connectionand the admin manifest editor now read theconnection:block only, because the flat spellings are gone with P6.Persisted internal keys stay by decision:
provider_metadatatagsopenai_chat,google,anthropic,_CONVERTER_TAG, native tool definitions,benchmarks/results.jsonand the committed baselines.Review fixes (head
0a8c0be374): a retired top-level section (embedding_providers) gets the migrate message whatever it holds (list, null, string, dict); a retired shim name in a per-face shim value (embeddings_shim,decisions_shim) raises with its path; a config refused for a retired name is not rewritten first (no write, no.pre-migration.bak);llm-rosetta-migrate --dbexits 0 once only the deliberately keptby_target_providerkeys remain (they are notes, printed and listed undernotesin the--jsonreport, not counted in the exit code);--scanfindings are advisory mentions and skip files also passed as--config; the tool stampsconfig_versionso a config it leaves current is not rewritten by the first load, and reports a load-time migration it cannot run aspending(--checkexits 3); a locked database is one error line and exit 2; the keptProviderShim.base,default_pathandmax_tool_description_lengthdocstrings name their replacements. Exit codes: 0 nothing left or only notes, 1 needs a person, 2 could not run, 3--checkpending.Checks on the head commit
0a8c0be374:ruff checkandruff format --checkclean;scripts/dev/run_ty.pypasses (also run by the commit hook on every commit);pytest tests --ignore=tests/integrationgives 11189 passed, 82 skipped, 0 failed;scripts/dev/public_api_diff.py --base-ref v0.13.0reports 0 breaking changes needing attention (44 acknowledged, the two added by P6 areresolve_base);scripts/check_shim_removals.pyreports 0 scheduled. The strict boundary test from #1653 passes with 0 sites outside the surface; this branch adds no allowlist entry (the gateway reaches core only throughllm_rosetta.api, which gainedvalidate_shim_declaration).Not verified:
tests/integration(needs live keys) and the repointedscripts/integration/*and benchmarks were not run;llm-rosetta-migratewas exercised by its own 70 tests only, not against a production database or config; no live gateway run. The docs worktrees carry the guide, the changelog and the surface page (62 names).AI usage: this change was prepared with Claude Code.