Repository navigation
1.1.0
1.1.0 pins opencode 2.3.0. It is a minor that moves the protocol pin, so two generated types
change the way upstream changed them: CredentialUpdated.Data becomes CredentialUpdatedData, and
SessionGenerateData gains required Tokens and Cost. Both are listed as breaking under
protocol changes. Since opencode 2.2.7 fewer endpoints wait for plugins, and
LanguageModels.WaitForDefaultAsync now waits the way opencode's CLI does.
🔌 Protocol changes
- The SDK pins opencode
2.3.0, where it pinned2.2.6. - Breaking:
CredentialUpdated.Datachanges fromIReadOnlyDictionary<string, JsonElement>toCredentialUpdatedData, because opencode 2.2.7 declares the event's data as the required string membersIntegrationIdandCredentialId. A reader changesIReadOnlyDictionary<string, JsonElement> data = updated.Data;toCredentialUpdatedData data = updated.Data;and reads those members directly. - Breaking:
SessionGenerateDatagains requiredTokenUsageInfo Tokensanddouble Cost, so code that constructs the record sets both alongsideText; the generation's usage counts toward the session's totals. GeneratePredicateQuestion.Criteriaaccepts aGeneratePredicateQuestionCriteriawith optionalTrueandFalsestrings describing the two outcomes.ConfigInfoExperimental.ConsoleWatchesexposes the console-watch feature flag.SessionUsageRecordedDataSource.Generatenames usage recorded by session generation.ProviderSettings.TlsandConfigProviderSettings.TlsacceptProviderTls, with requiredCertandKeystrings and optionalPassphrase, for a provider gateway's mutual TLS. The three values are masked in the record's printed form.ToolFreeformFormatnamesText,RegexandLark;ModelCapabilities.FreeformandConfigModelCapabilities.Freeformlist the formats a model supports.ConfigInfoExperimental.McpEventsexposes the MCP-event feature flag.ConfigInfoExperimental.ShellTimeoutBackgroundexposes the shell-timeout-background feature flag.SessionMessageAssistantTime.FirstTokenrecords when the provider streamed the first output token, in epoch milliseconds, asdouble?.ExperimentalMcpEvent, withExperimentalMcpEventData, joinsIEvent, andEventType.ExperimentalMcpEventfilters the event subscription toexperimental.mcp.event.SessionStepFirstToken, withSessionStepFirstTokenDataandSessionStepFirstTokenDurable, joinsIEvent,ISessionEventDurable,ISessionLogItemandISessionScopedEvent;EventType.SessionStepFirstTokenfilters the event subscription tosession.step.first-token.AgentsClient.ListAgentsAsync(agent.list) no longer declares503, because opencode 2.2.7 answers with the agents loaded so far instead of waiting for plugins. Since 2.2.7 the integration list (integration.list), usage limits (experimental.usage.limits), repository initialization (vcs.init), RPC calls (rpc.call) and the artifact routes (experimental.artifacts.*) do not wait for plugin activation either. Listing models and providers, the default model, web search, and experimental generation and voice still wait up to five seconds.ConfigWarming.Intervaldefaults toautoat opencode 2.3.0: 90% of the model'scache.ttl, or 4 minutes when the model has none. The default was 4 minutes, andautoskipped models without a ttl. The property's summary says so.- A failed persistent-terminal rename (
PersistentPtyClient.UpdateAsyncwith aTitle) answers404or503on opencode 2.3.0.501withPtyFeatureUnsupportedErrorstays declared, but the pinned server no longer answers it.
🔧 Changes
LanguageModels.WaitForDefaultAsyncnow waits the way opencode's CLI does at 2.3.0: it polls the location's plugin list every 25 ms for up to five seconds, until non-empty, then reads the default model once. A failed plugin listing ends the wait without an error, and the read follows. AServiceUnavailableErrorfrom that read now surfaces where it was retried up to twelve times. The call is unchanged:await client.LanguageModels.WaitForDefaultAsync();.OpenCodeServer.StopAsyncno longer asks the daemon to shut its persistent terminals down before it ends the process, and makes no request to the daemon at all, as the CLI'sservice stopdoes since opencode 2.3.0; ending the daemon still ends its terminals.- The status sentence of
OpenCodeApiException.Messagenow includes the server's own message, chosen as opencode's own client chooses it, for exampleThe opencode API returned status 503 ('ServiceUnavailableError'): opencode-pty request timed out..Error,StatusandRawBodyare unchanged; code that matched the old message text exactly now sees the longer text whenever the server sends a non-empty message.
📚 Documentation
OpenCodeServer.StopAsync's summary says a pid reused after the stop first looked at the process is never signalled, where it said "a pid the operating system reused", and that a service that re-registered after the stop read the registration is never signalled, where it said "before the stop began", and the connection-modes guide says the same.- The errors guide names the
401challenge asWWW-Authenticate: Basic realm="Secure Area", where it saidWWW-Authenticate: Basic.