Step-by-step guide to migrate from SofIA SDK v0.x to v1.0
This guide covers every breaking change and deprecation between SofIA SDK v0.0.x and v1.0.0, with before/after code examples and a checklist to complete the migration.Start by upgrading to the latest version:
npm install @omniloy/sofia-sdk@latest
Then make sure the SDK is imported once in your app’s entry file — this side-effect import is what registers the <sofia-sdk> custom element. Without it, the component never mounts:
// In your entry file (main.js, index.js, app.js, ...)import '@omniloy/sofia-sdk';
Using React? Import the component and its styles from the /react subpath instead:
import { Omniscribe } from '@omniloy/sofia-sdk/react';import '@omniloy/sofia-sdk/react/index.css';
Not sure whether the SDK registered? Run customElements.get('sofia-sdk') in the browser console — it should return the component definition, not undefined.
Chat-only mode is now automatic. If you omit both template and templateid, the SDK operates in chat-only mode without showing the generate button.Before (v0.x):
<sofia-sdk isonlychat="true" baseurl="https://..." <!-- other props -->></sofia-sdk>
After (v1.0):
<!-- Simply omit template and templateid --><sofia-sdk baseurl="https://..." <!-- other props -->></sofia-sdk>
If the component should not be rendered, don’t mount it at all instead of passing a disable flag.Before (v0.x):
<sofia-sdk disableactions="true" ...></sofia-sdk>
After (v1.0):
// Conditionally render based on your application logicif (shouldShowSofia) { document.getElementById('container').innerHTML = '<sofia-sdk ...></sofia-sdk>';}
7. Remove wssurl (v1.0.7+) and simplify baseurl (v1.0.8+)
As of v1.0.7, wssurl is deprecated and ignored — the transcription WebSocket URL is delivered by the settings API. Remove it. For newer keys, the SDK (v1.0.8) resolves the endpoint automatically, so you can also drop baseurl (Omniloy tells you whether your key needs it).Before:
These props were deprecated in v0.0.10 and are removed in v1.0. If still passed, they have no functional effect but emit deprecation warnings when debug="true" is enabled.