diff --git a/internal/licences/adapters/adapters.go b/internal/licences/adapters/adapters.go index a60dc7d..6f8e27b 100644 --- a/internal/licences/adapters/adapters.go +++ b/internal/licences/adapters/adapters.go @@ -167,6 +167,7 @@ type UsageRow struct { var registry = map[string]Shape{ "anthropic": RefreshableGrant, "anthropic-api-key": StaticKey, + "openai": StaticKey, } // For returns the adapter for a vendor, refusing an unknown one clearly. diff --git a/internal/licences/adapters/adapters_test.go b/internal/licences/adapters/adapters_test.go index e8e46a1..b8528c0 100644 --- a/internal/licences/adapters/adapters_test.go +++ b/internal/licences/adapters/adapters_test.go @@ -22,6 +22,16 @@ func TestTheTwoShapesAreSelectedByVendor(t *testing.T) { if grant.Shape() != RefreshableGrant { t.Fatalf("anthropic is %q, expected refreshable-grant", grant.Shape()) } + + // openai is a second static-key vendor, served by the same generic adapter — the registry line is + // the whole of its integration, and it reports the static-key shape like any other. + openai, err := For("openai") + if err != nil { + t.Fatal(err) + } + if openai.Shape() != StaticKey { + t.Fatalf("openai is %q, expected static-key", openai.Shape()) + } } // The type assertion is what gates the carve-out: a static key is not a Refresher, so it can never