WatchRateRejectedPayload watch.rate.rejected@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- watch
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/events/payloads/watch.rate.rejected.v1.json
watch.rate.rejected v1 (OpenVibe.Watch server/provider-rates.js decide(); plan P6, flag WATCH_PROVIDER_RATES off by default): a person rejected a pending provider-rate change. The payload is the change (watch.rate.changed@1) plus the decision. Rejecting a change writes no rate, and applied is always false. Money is integer nano-USD per million tokens as a decimal string (D1: never a float). Envelope: subject { type: provider-rate, id: <source_key> }, visibility internal, priority important, source and actor service:watch; actor is the service, and decided_by names the person.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
change_id | string | yes |
| |
source_key | string | yes | The source Watch fetched: the provider's key in its registry (deepinfra, featherless). | |
provider | string | yes | The provider whose document stated the rate (deepinfra, featherless). | |
model | string | yes | The model id exactly as the provider's document stated it. | |
token_class | enum | yes | The D1 token classes. |
|
from_nano_usd_per_m | string | null | yes | The value Watch last observed, as an integer nano-USD per million tokens string; null for a first price. |
|
to_nano_usd_per_m | string | yes | The value the document stated, as an integer nano-USD per million tokens string. |
|
currency | string | yes | The document's currency; USD for both sources today. | |
region | string | yes | The document's scope; global for both sources today. | |
effective_date | string | yes | The first day this value was observed (YYYY-MM-DD). |
|
source_url | string | yes | The official document fetched. |
|
fetched_at | string | yes |
| |
approval_required | const | yes | false: the decision is made. |
|
state | const | yes |
| |
decided_by | string | yes | The person who rejected it. A service or an agent may not; Watch refuses those with watch.rate_person_only. |
|
decided_at | string | yes |
| |
applied | const | yes | Always false: a decision never writes a billable rate. |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: featherless-output
{
"change_id": "prc_01JAB2C3D4E5F6G7H8J9K0MNPS",
"source_key": "featherless",
"provider": "featherless",
"model": "Qwen/Qwen3-8B",
"token_class": "output",
"from_nano_usd_per_m": "75000000",
"to_nano_usd_per_m": "80000000",
"currency": "USD",
"region": "global",
"effective_date": "2026-11-03",
"source_url": "https://api.featherless.ai/v1/models",
"fetched_at": "2026-11-03T10:00:00.000Z",
"approval_required": false,
"state": "rejected",
"decided_by": "usr_01JAB2C3D4E5F6G7H8J9K0MNPT",
"decided_at": "2026-11-03T12:30:00.000Z",
"applied": false
}Rejected: missing-decided-by
{
"change_id": "prc_01JAB2C3D4E5F6G7H8J9K0MNPS",
"source_key": "featherless",
"provider": "featherless",
"model": "Qwen/Qwen3-8B",
"token_class": "output",
"from_nano_usd_per_m": "75000000",
"to_nano_usd_per_m": "80000000",
"currency": "USD",
"region": "global",
"effective_date": "2026-11-03",
"source_url": "https://api.featherless.ai/v1/models",
"fetched_at": "2026-11-03T10:00:00.000Z",
"approval_required": false,
"state": "rejected",
"decided_at": "2026-11-03T12:30:00.000Z",
"applied": false
}Rejected: wrong-state
{
"change_id": "prc_01JAB2C3D4E5F6G7H8J9K0MNPS",
"source_key": "featherless",
"provider": "featherless",
"model": "Qwen/Qwen3-8B",
"token_class": "output",
"from_nano_usd_per_m": "75000000",
"to_nano_usd_per_m": "80000000",
"currency": "USD",
"region": "global",
"effective_date": "2026-11-03",
"source_url": "https://api.featherless.ai/v1/models",
"fetched_at": "2026-11-03T10:00:00.000Z",
"approval_required": false,
"state": "approved",
"decided_by": "usr_01JAB2C3D4E5F6G7H8J9K0MNPT",
"decided_at": "2026-11-03T12:30:00.000Z",
"applied": false
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('watch.rate.rejected@1', value); // { valid, errors: [{ path, message }] }