OpenFeature provider support
OpenFeature provider support is the adapter layer between OpenFeature SDKs and GO Feature Flag. It lets an application use the OpenFeature API while GO Feature Flag supplies flag rules, targeting, variants, and evaluation details across server and client runtimes.
OpenFeature integration model
OpenFeature defines the common client API. A provider connects that API to GO Feature Flag and maps each evaluation to an OpenFeature result. The provider can keep evaluation near the application or send it to the relay proxy, while the application keeps the same flag access pattern.
The main path from an application request to a flag result is:
flowchart LR
App[Application] --> SDK[OpenFeature SDK]
SDK --> Provider[GO Feature Flag provider]
Provider -->|Local evaluation or remote request| Engine[GO Feature Flag evaluation]
Engine --> Result[OpenFeature evaluation result]
This boundary separates application code from the transport and from the place where evaluation runs.
References: openfeature/README.md• L1-4 website/…/openfeature_go.mdx• L14-19
Provider families
The project supports providers for server and client applications. Server providers focus on flag evaluation through a relay proxy or a local evaluation engine. Client providers keep a usable flag view close to mobile or browser code when each evaluation should not require a network call.
| Application family | Provider coverage | Main capability |
|---|---|---|
| Server | Go, Java/Kotlin, Node.js, .NET, Python, Ruby, PHP, and Rust through OFREP | OpenFeature evaluation with remote and, where supported, local choices. |
| Android | Kotlin | Prefetch and local flag access with refresh and usage collection. |
| Browser | JavaScript/TypeScript | Evaluation from one static context with recovery and configuration-change events. |
| Apple client | Swift | OpenFeature access for iOS, macOS, and tvOS applications. |
| Framework integrations | Angular, React, and NestJS | OpenFeature framework bindings that use the browser or Node.js provider rather than a separate GO Feature Flag evaluator. |
Provider source ownership differs by language. This repository keeps the Python and Android/Kotlin provider work. Several server providers live in OpenFeature contribution repositories. The Swift provider has its own repository. Rust uses the generic OpenFeature OFREP provider because the relay proxy implements OFREP; it is not a GO Feature Flag-specific Rust provider. The provider index in openfeature/README.md is the starting point for package and source links.
Server provider implementations
Server providers expose OpenFeature accessors for boolean, string, number, and object flags. They return the selected value with useful detail such as the variant, resolution reason, error code, and metadata when the SDK supports those fields.
The providers share one product contract even when their runtimes differ. Each accepts a relay proxy endpoint, sends evaluation context to GO Feature Flag, and uses the caller's default when evaluation cannot provide a valid value. The shared integration suites pin known SDK and provider versions so that they check a stable OpenFeature contract. The Go suite now uses Go 1.26.11; its other direct dependencies remain the OpenFeature Go SDK 1.20.0, GO Feature Flag provider 1.1.3, and Testify 1.12.1. The module also records the OFREP provider used by the provider contract.
The Python provider package is version 1.4.0 and supports Python 3.10 or newer. Its supported package range includes OpenFeature SDK 0.8.4 through versions below 0.11.0 and the OpenFeature OFREP provider at version 0.3.0 or newer. The package targets provider specification version 1.0.
References: openfeature/README.md• L6-21 website/…/openfeature_go.mdx• L14-19 website/…/openfeature_javascript.mdx• L15-16 website/…/openfeature_python.mdx• L15-19 website/…/openfeature_rust.mdx• L12-25 openfeature/…/go.mod• L1-22 openfeature/…/pom.xml• L11-43 openfeature/…/package.json• L6-19 openfeature/…/ProviderTests.csproj• L3-21 openfeature/…/pyproject.toml• L1-31 openfeature/…/__init__.py• L11-17 openfeature/…/uv.lock• L220-248
Client provider implementations
Client providers adapt the same flag contract to runtimes where per-evaluation network calls are costly or expose user data. The Android provider prefetches and refreshes a local flag view. The web provider uses one static evaluation context and reports configuration changes so the application can react to new values. The Swift provider follows the same prefetch and refresh model for Apple client apps.
These providers still use the normal OpenFeature client. The difference is where context and freshness are managed, not how application code asks for a flag.
The browser example uses the GO Feature Flag web provider with the OpenFeature web SDK. Its package manifest and lock file keep those two packages aligned for a reproducible example environment.
References: openfeature/…/README.md• L8-19 website/…/openfeature_android.mdx• L15-26 website/…/openfeature_javascript.mdx• L18-24 website/…/openfeature_javascript.mdx• L96-109 website/…/openfeature_swift.mdx• L14-22 openfeature/…/README.md• L4-6 examples/…/package.json• L53-58 examples/…/package-lock.json• L2242-2262
Framework integrations
Framework integrations add application-specific OpenFeature wiring without changing the provider contract. Angular and React use the browser provider for flag-aware UI, while NestJS uses the Node.js provider through the NestJS OpenFeature module.
These integrations keep provider setup and evaluation in the framework's normal lifecycle. They do not add a new evaluation engine or a second flag model, so the same targeting context and OpenFeature value types apply.
References: website/…/openfeature_angular.mdx• L18-25 website/…/openfeature_react.mdx• L18-23 website/…/openfeature_nestjs.mdx• L15-20
Evaluation modes
Server providers map GO Feature Flag evaluation into two broad modes. In-process mode keeps flag configuration with the provider and evaluates locally. Remote mode keeps the relay proxy as the evaluation point and uses the OpenFeature Remote Evaluation Protocol, or OFREP.
flowchart TD
Choice{Evaluation mode}
Choice --> Local[In-process]
Choice --> Remote[Remote through OFREP]
Local --> Fetch[Fetch and refresh configuration]
Fetch --> EvaluateLocal[Evaluate with local engine]
Remote --> EvaluateRemote[Send evaluation to relay proxy]
EvaluateLocal --> Details[OpenFeature details]
EvaluateRemote --> Details
In-process evaluation
In-process evaluation fetches configuration before normal evaluation starts. The provider then evaluates against its local copy. This lowers evaluation latency and reduces relay proxy traffic. A background refresh keeps the copy aligned with the server, so freshness depends on the refresh interval rather than a request for every flag.
This mode has a readiness and freshness lifecycle. A provider must become ready before it can evaluate from local configuration. If a later refresh fails, the last known good configuration remains the basis for evaluation while the provider reports that it is stale.
The Python provider runs this path through a bundled WASI evaluation engine pinned to version 0.3.1. Its engine version and release artifact must stay aligned with the 1.4.0 provider release.
References: openfeature/…/README.md• L20-33 openfeature/…/inprocess_evaluator.py• L134-192 openfeature/…/_wasi_version.txt• L1 openfeature/…/__init__.py• L11-17 openfeature/…/CHANGELOG.md• L3-9 openfeature/…/hatch_build.py• L23-53 openfeature/…/README.md• L61-74
Remote evaluation
Remote evaluation sends each flag request to the relay proxy through OFREP. The server remains the source of truth, so configuration changes apply without waiting for a local refresh. This mode fits deployments that centralize evaluation in a sidecar, gateway, or relay service.
The Python provider uses the same OFREP path for explicit remote mode and as a fallback when a local evaluation engine cannot produce a result. The fallback marks the result as remote so local usage collection does not count the request twice.
Rust uses the generic OFREP provider only. Each evaluation goes to the relay proxy, so Rust has no local evaluation, configuration polling, or provider-side custom tracking path.
References: openfeature/…/remote_evaluator.py• L18-39 openfeature/…/inprocess_evaluator.py• L366-410 openfeature/…/ofrep.py• L19-54 website/…/openfeature_rust.mdx• L12-25 website/…/openfeature_rust.mdx• L148-162
OpenFeature evaluation contract
The provider translates GO Feature Flag's evaluation result into the OpenFeature contract. That contract keeps the flag value and its explanation together, so application code can use a simple value call or inspect why the value was returned.
Evaluation contexts
An OpenFeature evaluation context carries the targeting key and attributes used by GO Feature Flag rules. The targeting key is required because percentage rollouts and user targeting need a stable subject. The provider passes the context to the local engine or serializes it for the relay proxy, based on the selected mode.
The context can also carry GO Feature Flag control data. Examples include a restricted flag list for local configuration and enriched metadata for evaluation reporting. These keys extend the provider contract without changing the OpenFeature client API.
References: openfeature/…/README.md• L70-107 website/…/openfeature_javascript.mdx• L164-181 website/…/openfeature_android.mdx• L120-153 openfeature/…/inprocess_evaluator.py• L322-334
Value types and resolution details
The supported value types map to OpenFeature accessors for boolean, string, number, and object values. A successful result includes the selected value. It can also include a variant, a reason such as TARGETING_MATCH or DISABLED, and flag metadata.
The provider test contract also covers invalid requests. A missing flag or type mismatch returns the caller's default with an OpenFeature error reason and the matching error code. This prevents a bad flag response from silently becoming a value of the wrong type.
References: openfeature/…/provider.test.js• L49-109 openfeature/…/provider_test.go• L45-176 openfeature/…/ProviderTests.java• L62-119 openfeature/…/ProviderTests.cs• L43-107
Provider lifecycle and telemetry
Providers do more than resolve a value. They expose readiness and change signals. They can also send usage data to the relay proxy so flag use and named product events remain visible.
The Python provider selects its evaluator during setup, then installs context enrichment before usage collection. This makes each collected event see the same provider metadata as the evaluator. It also exposes configuration-change, stale, and ready signals from in-process refreshes, so applications can observe both changed values and configuration health.
Provider lifecycle signals
The OpenFeature lifecycle tells an application when a provider is ready, when it cannot serve the newest configuration, and when a refresh recovers. In-process providers use these signals to make configuration freshness visible instead of hiding it behind a local cache. Client providers expose similar ready, error, stale, and configuration-change events.
Applications that need a known initial state should wait for provider readiness before the first local evaluation. Applications that can tolerate the last known good state should monitor stale and configuration-change events instead.
References: openfeature/…/provider.py• L86-107 openfeature/…/provider.py• L122-176 openfeature/…/inprocess_evaluator.py• L279-307 openfeature/…/README.md• L135-154 website/…/openfeature_javascript.mdx• L54-59
Usage data and tracking
Usage collection records which flags were evaluated and what result the application received. Providers batch these events and send them to the relay proxy data collector. Exporter metadata adds stable provider information to each batch. An option lets an application turn collection off.
The OpenFeature tracking API adds named business events beside automatic flag usage events. Remote evaluations are already recorded by the relay proxy. Providers must therefore avoid emitting a second local event for the same request. The Rust OFREP path has no OFREP tracking endpoint, so custom tracking is not forwarded there.
References: website/…/openfeature_go.mdx• L165-208 openfeature/…/GoFeatureFlagProvider.kt• L118-145 openfeature/…/data_collector.py• L66-126 openfeature/…/event_publisher.py• L25-41 website/…/openfeature_rust.mdx• L148-156
Provider conformance suite
The provider suite checks the cross-language contract against live relay proxy instances. It uses one shared flag configuration and OpenFeature clients for Java, JavaScript, Go, and .NET. A provider is checked against the same expected values and reasons instead of only against mocked transport responses.
Shared relay proxy scenarios
The integration runner starts an unauthenticated relay proxy and an authenticated relay proxy. It then runs each language suite against the same flag set. The scenarios cover normal targeting, disabled flags, all supported value types, missing flags, type mismatches, and authentication behavior.
The shared fixture also exercises boundary behavior that can drift between providers. This includes flag metadata, evaluation-context enrichment, semantic-version targeting, and the difference between a valid default result and an error result.
References: openfeature/…/integration_tests.sh• L17-58 openfeature/…/flags.yaml• L1-190 openfeature/…/goff-proxy.yaml• L1-20 openfeature/…/goff-proxy-authenticated.yaml• L1-20
Language-specific provider checks
Each language suite calls the public OpenFeature API and compares the returned details with the expected OpenFeature result. The JavaScript suite also checks provider initialization for bad or missing credentials. The Go suite adds rule behavior such as semantic-version matching. The Python provider maintains its own unit and relay-proxy integration coverage for both evaluation modes.
The Go integration project now targets Go 1.26.11 with OpenFeature Go SDK 1.20.0, GO Feature Flag provider 1.1.3, and Testify 1.12.1. Its module checksums include the OFREP provider used by the provider contract. The Java integration project uses Java 11 as its source and target level. It runs JUnit Jupiter 6.1.3 with Maven Surefire 3.6.1, OpenFeature SDK 1.23.0, and GO Feature Flag provider 2.0.2. The JavaScript integration project runs Jest 30.5.2 and uses OpenFeature server SDK 1.23.0 with GO Feature Flag provider 2.2.0. Its provider package also depends on the OpenFeature OFREP provider contract. The .NET integration project targets .NET 9 and uses Microsoft.NET.Test.Sdk 18.12.0, NUnit 5.0.0 with NUnit3TestAdapter 6.3.1, OpenFeature 2.14.1, and GO Feature Flag provider 0.2.1. Rust uses the generic OFREP provider and is outside this GO Feature Flag-specific shared suite. These pinned test dependencies keep the shared checks tied to known SDK and provider contracts.
Together, these checks protect the important promise of provider support: changing the language or provider package should not change the meaning of a flag evaluation, its default behavior, or its error classification.
References: openfeature/…/provider.test.js• L333-423 openfeature/…/provider_test.go• L715-900 openfeature/…/go.mod• L1-22 openfeature/…/go.sum• L13-32 openfeature/…/ProviderTests.cs• L367-440 openfeature/…/ProviderTests.csproj• L1-23 openfeature/…/ProviderTests.java• L343-413 openfeature/…/pom.xml• L11-43 openfeature/…/package.json• L6-19 openfeature/…/package-lock.json• L7-18 openfeature/…/README.md• L164-172 openfeature/…/pyproject.toml• L23-31 openfeature/…/__init__.py• L11-17 openfeature/…/uv.lock• L288-306
Change checklist
When these files or sections are changed, remember to consider these:
- The OpenFeature value and detail mappings must stay aligned across every language suite and the shared flags.yaml fixture.
- Changes to relay proxy authentication must update both the provider header contract and the authenticated proxy scenarios.
- Changes to configuration freshness or provider events must preserve the ready, stale, recovery, and configuration-change meanings used by local and client providers.
- Changes to evaluation mode must preserve the rule that remote results are not emitted again as local usage events.
- Changes to the OFREP response shape must be checked against both explicit remote evaluation and in-process remote fallback.
- Changes to provider package ownership or release locations must keep the provider source links in openfeature/README.md correct.
- Changes to Java, JavaScript, Go, or .NET test SDK and provider versions must keep the language suites aligned with the shared OpenFeature result contract.
- Changes to Java or JavaScript test runtime dependencies must keep the Maven descriptor or npm manifest aligned with its lock or resolved dependency state.
- Changes to the React OpenFeature example dependencies must keep its npm manifest and lock file aligned with the web provider and OpenFeature SDK versions.
- Changes to the web OpenFeature example dependencies must keep examples/…/package.json aligned with examples/…/package-lock.json and the supported web provider and SDK pair.
- Changes to the Go integration test toolchain must keep the Go version, module requirements, and checksums aligned in
go.modandgo.sum. - Changes to Python provider support ranges or OFREP dependencies must keep pyproject.toml and uv.lock aligned.
- Changes to the .NET target framework, test SDK, test framework adapter, or OpenFeature package references must keep the project compatible with the .NET provider tests and their shared result contract.
- Changes to the Python WASI engine pin must keep _wasi_version.txt aligned with the matching binary in
wasm-releasesand with the package build hook. - Changes to Python provider initialization or hook order must preserve context enrichment before usage collection and the lifecycle events emitted by in-process refreshes.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| The evaluation context has no targeting key. | User targeting or rollout evaluation cannot identify the subject and the provider returns an error or default result. | Set a stable user, session, or equivalent targeting key in every GO Feature Flag context. |
| A local provider is used before its initial configuration is ready. | The application sees a not-ready or default result instead of a flag-not-found result. | Wait for the provider ready signal or use the OpenFeature wait-for-provider operation. |
| The requested accessor type does not match the flag value. | The provider returns the caller's default with a type-mismatch error. | Use the accessor that matches the flag's configured type. |
| A local configuration refresh fails repeatedly. | The provider becomes stale while the last known good configuration continues to serve. | Monitor stale and recovery events and fix relay proxy reachability or credentials. |
| An authenticated relay proxy receives a missing or invalid API key. | Provider initialization or evaluation fails with an authorization or general error. | Configure the provider key and header scheme to match the relay proxy. |
| The relay proxy or data collector stays unavailable. | Remote evaluations fail. Queued usage events retry and can be dropped after the bounded buffer fills. | Choose the evaluation mode for the network boundary and monitor collector health and drop warnings. |
| The Rust OFREP provider is expected to run local evaluation or forward custom tracking. | Evaluations remain network-bound and custom tracking calls are not sent to the relay proxy. | Use a provider with local evaluation or tracking support when those capabilities are required. |
| The Python provider's pinned WASI version has no matching file in its release source. | The package build fails before it can ship the in-process evaluation engine. | Keep _wasi_version.txt, the wasm-releases submodule, and the build artifact at the same version. |
| The Java or JavaScript integration suite uses an unsupported runtime or mismatched dependency set. | The suite may fail before it can check provider behavior or may no longer represent the intended OpenFeature contract. | Keep Java source and target settings, the Node.js runtime, npm manifests, and resolved dependency files aligned. |
| The Go integration suite uses a Go or module dependency set that is not reflected in its checksum file. | Dependency resolution can fail before the suite checks provider behavior. | Keep the Go version and required modules in go.mod aligned with the checksums in go.sum. |
| The .NET integration project uses an unsupported target framework or mismatched test SDK, test framework adapter, or OpenFeature package set. | The .NET suite may fail before it checks provider behavior or may test a different provider contract from the other suites. | Keep the .NET target, Microsoft.NET.Test.Sdk, NUnit, NUnit3TestAdapter, OpenFeature, and provider package references aligned with the supported provider test contract. |
| The Python provider package metadata and lock file describe different OpenFeature or OFREP ranges. | A clean install can resolve a provider environment that differs from the tested contract. | Keep the dependency ranges in pyproject.toml aligned with the resolved packages in uv.lock. |
| The Python provider uses a provider instance with an invalid hook default or changed hook order. | Provider setup or usage collection can fail, or collected context can miss exporter metadata. | Keep provider hook initialization valid and run enrichment before data collection. |
| The web example manifest and lock file resolve different OpenFeature web provider or SDK versions. | The example can fail to install or can demonstrate a dependency pair that does not match the documented browser provider contract. | Keep the direct dependency declarations and resolved package entries aligned in both npm files. |
Key files
| File | Why to read it |
|---|---|
| openfeature/README.md | Provider language coverage, package locations, and source ownership. |
| openfeature/…/integration_tests.sh | End-to-end test flow that starts relay proxies and runs the language suites. |
| openfeature/…/flags.yaml | Shared flag behavior used to compare provider results across languages. |
| openfeature/…/pom.xml | Java test runtime and pinned OpenFeature SDK, provider, JUnit, and Surefire contract. |
| openfeature/…/ProviderTests.java | Java provider checks for types, defaults, metadata, and authentication. |
| openfeature/…/package.json | JavaScript test command and direct OpenFeature, provider, and Jest dependencies. |
| openfeature/…/package-lock.json | Resolved JavaScript dependency state for reproducible integration checks. |
| openfeature/…/provider.test.js | JavaScript provider result and provider-initialization checks. |
openfeature/provider_tests/go-integration-tests/go.mod | Go test runtime and pinned OpenFeature SDK, provider, and OFREP contract. |
openfeature/provider_tests/go-integration-tests/go.sum | Checksums that keep the Go integration test dependency set reproducible. |
| openfeature/…/provider_test.go | Broad OpenFeature result checks plus authentication and targeting-rule scenarios. |
openfeature/provider_tests/dotnet-integration-tests/ProviderTests/ProviderTests.csproj | .NET 9 test runtime plus the pinned test SDK, NUnit test framework and adapter, OpenFeature SDK, and provider package contract. |
| openfeature/…/ProviderTests.cs | .NET provider checks for typed results, defaults, errors, metadata, and authentication. |
| openfeature/…/pyproject.toml | Python provider version, supported Python range, and OpenFeature and OFREP dependency contract. |
| openfeature/…/uv.lock | Resolved Python provider and OFREP dependency versions used for repeatable installs. |
| openfeature/…/README.md | Current Python provider modes, supported options, and conformance scope. |
| openfeature/…/__init__.py | Python provider release version and provider specification version. |
| openfeature/…/provider.py | Python provider boundary between OpenFeature, evaluator choice, lifecycle, hooks, and result accessors. |
| openfeature/…/inprocess_evaluator.py | Local configuration, readiness, refresh, fallback, and result mapping model. |
| openfeature/…/remote_evaluator.py | OFREP-based remote evaluation model. |
| openfeature/…/_wasi_version.txt | Single version pin for the WASI engine used by Python in-process evaluation. |
| openfeature/…/hatch_build.py | Package build step that pairs the WASI version pin with its release binary. |
openfeature/providers/python-provider/wasm-releases | Release source for the WASI binary bundled with the Python provider. |
| openfeature/…/README.md | Android provider capabilities, cache freshness, lifecycle events, and OpenFeature usage. |
| openfeature/…/GoFeatureFlagProvider.kt | Kotlin provider boundary, OFREP evaluation, data collection, and tracking. |
| website/…/openfeature_rust.mdx | Generic OFREP integration for Rust and its remote-only evaluation and tracking limits. |
| website/…/openfeature_angular.mdx | Angular binding that uses the web provider for flag-aware templates. |
| website/…/openfeature_react.mdx | React binding that supplies OpenFeature context and flag hooks. |
| website/…/openfeature_nestjs.mdx | NestJS binding that reuses the Node.js provider. |
| examples/…/package.json | React example dependency contract for the OpenFeature web provider and React SDK. |
| examples/…/package.json | Browser example dependency declarations for the GO Feature Flag web provider and OpenFeature web SDK. |
| examples/…/package-lock.json | Resolved browser example dependencies that keep the web provider and SDK install reproducible. |