You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: JUDGE_FIX_PLAN.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ The remaining items are external setup (fund a live LLM provider) or larger foll
14
14
| P0 | LLM is currently fallback | The thesis is "AI agents buying/selling reads"; deterministic fallback weakens the product story on video. | External: top up Anthropic or set `LLM_PROVIDER=openai` with a funded OpenAI key. | S |
15
15
| P1 | Market is effectively 1:1 | One buyer plus one seller is coordination, not a market. | Done: `round.ts` launches three TxODDS seller personas; specialist is priced to win. | S |
16
16
| P1 | Seller agent has legacy generic services | CoinGecko/Jupiter/news code distracts from the TxODDS story. | Done: `service.ts` is TxODDS-only and seller docs describe legacy helpers as outside the loop. | S |
17
-
| P1 | Arbiter is centralized | One proxy-controlled arbiter key makes "trustless" easy to challenge. | Done in docs: described as arbiter-gated with a trusted neutral arbiter, not decentralized arbitration. | S |
17
+
| P1 | Arbiter is centralized | One proxy-controlled arbiter key makes overbroad settlement claims easy to challenge. | Done in docs: described as arbiter-gated with a trusted neutral arbiter. | S |
18
18
| P2 | Product value is thin | The read restates de-margined odds; there is not yet a real betting edge. | Be honest now; stretch goal is bookmaker comparison for true edge. | L |
19
19
| P2 | No Rust CI | Devnet tests cannot run in Actions, so contract regressions are not caught in CI. | Add LiteSVM/Mollusk contract tests. | M |
20
20
| P2 | Free TxLINE tier is brittle | Intermittent feed/tokens can undermine demos. | Keep fallback data, document the dependency, and prefer a warmed token/session before recording. | S |
@@ -97,13 +97,12 @@ base escrow path. That means the best innovations are absent from the multi-agen
97
97
98
98
## P1: Tighten Arbiter Language
99
99
100
-
**Problem:** a single arbiter key controlled by the proxy is not decentralized.
100
+
**Problem:** a single arbiter key controlled by the proxy is a trusted neutral party.
101
101
102
102
**Fix:**
103
103
104
-
- Avoid saying simply "trustless" without qualification.
105
-
- Prefer "arbiter-gated", "buyer cannot unilaterally claw back", and "trustless between buyer and seller, with a trusted neutral arbiter".
Copy file name to clipboardExpand all lines: LLM.md
+20-20Lines changed: 20 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,58 +1,58 @@
1
-
# LLMs — what they do, and how to switch provider / keys
1
+
# LLMs - what they do, and how to switch provider / keys
2
2
3
-
The kit is **provider-agnostic**. One shim —[`packages/agent-runtime/src/llm/complete.ts`](packages/agent-runtime/src/llm/complete.ts)
4
-
— makes a single `fetch` call (no vendor SDK) and supports **Anthropic** (default) and **OpenAI**. You
5
-
flip the whole demo between them with **env vars only — no code change**.
3
+
The kit is **provider-agnostic**. One shim -[`packages/agent-runtime/src/llm/complete.ts`](packages/agent-runtime/src/llm/complete.ts)
4
+
- makes a single `fetch` call (no vendor SDK) and supports **Anthropic** (default) and **OpenAI**. You
5
+
flip the whole demo between them with **env vars only - no code change**.
6
6
7
7
## Where the LLM is used
8
8
9
9
| Where | What it does | Falls back to |
10
10
|-------|--------------|---------------|
11
-
|**The read**—`analyzeEdge()` ([`agent/edge.ts`](examples/txodds/agent/edge.ts)) →`complete()`| turns the verified fair line into a one-line read + confidence | a **deterministic** read (favourite by probability) — so the demo never breaks |
12
-
|**The CoralOS round**— the seller's `edge` delivery ([`coral-agents/seller-agent`](coral-agents/seller-agent)) | the seller runs the same edge over MCP | a deterministic delivery |
11
+
|**The read**-`analyzeEdge()` ([`agent/edge.ts`](examples/txodds/agent/edge.ts)) ->`complete()`| turns the verified fair line into a one-line read + confidence | a **deterministic** read (favourite by probability) - so the demo never breaks |
12
+
|**The CoralOS round**- the seller's `edge` delivery ([`coral-agents/seller-agent`](coral-agents/seller-agent)) | the seller runs the same edge over MCP | a deterministic delivery |
13
13
14
14
If there's **no key (or the account is out of credits)**, the call throws and the code uses the
15
15
deterministic fallback. The web UI shows a **`deterministic`** badge instead of `LLM` so you can tell.
16
16
17
17
## The env vars
18
18
19
-
All live in the repo-root **`.env`** (gitignored — never committed). `.env.example` shows the empty fields.
19
+
All live in the repo-root **`.env`** (gitignored - never committed). `.env.example` shows the empty fields.
20
20
21
21
| Var | Meaning |
22
22
|-----|---------|
23
-
|`ANTHROPIC_API_KEY`| Anthropic key (`sk-ant-…`). The default provider. |
24
-
|`OPENAI_API_KEY`| OpenAI key (`sk-…`). |
23
+
|`ANTHROPIC_API_KEY`| Anthropic key (`sk-ant-...`). The default provider. |
24
+
|`OPENAI_API_KEY`| OpenAI key (`sk-...`). |
25
25
|`LLM_PROVIDER`| Force the provider: `anthropic` or `openai`. Optional. |
26
26
|`LLM_MODEL`| Override the model id. Optional (sensible per-provider default otherwise). |
27
-
|`TRACE`|`1`→ log the chosen provider/model + the raw reply. |
27
+
|`TRACE`|`1`-> log the chosen provider/model + the raw reply. |
28
28
29
29
## How the provider is chosen
30
30
31
31
[`pickProvider()`](packages/agent-runtime/src/llm/complete.ts) resolves it in this order:
32
32
33
-
1.**Explicit**— if `LLM_PROVIDER=openai` (or `anthropic`), use that.
34
-
2.**Auto-detect**— else if `OPENAI_API_KEY` is set, use **OpenAI**.
35
-
3.**Default**— else **Anthropic**.
33
+
1.**Explicit**- if `LLM_PROVIDER=openai` (or `anthropic`), use that.
34
+
2.**Auto-detect**- else if `OPENAI_API_KEY` is set, use **OpenAI**.
35
+
3.**Default**- else **Anthropic**.
36
36
37
-
Default models (override with `LLM_MODEL`): Anthropic `claude-haiku-4-5-20251001`· OpenAI `gpt-4o-mini`.
37
+
Default models (override with `LLM_MODEL`): Anthropic `claude-haiku-4-5-20251001`- OpenAI `gpt-4o-mini`.
38
38
39
-
## Switch it — copy/paste
39
+
## Switch it - copy/paste
40
40
41
41
**Anthropic (default):**
42
42
```ini
43
-
ANTHROPIC_API_KEY=sk-ant-…
43
+
ANTHROPIC_API_KEY=sk-ant-...
44
44
# LLM_PROVIDER / OPENAI_API_KEY unset
45
45
```
46
46
47
47
**OpenAI:**
48
48
```ini
49
49
LLM_PROVIDER=openai
50
-
OPENAI_API_KEY=sk-…
50
+
OPENAI_API_KEY=sk-...
51
51
```
52
52
53
53
**Pin a specific model:**
54
54
```ini
55
-
ANTHROPIC_API_KEY=sk-ant-…
55
+
ANTHROPIC_API_KEY=sk-ant-...
56
56
LLM_MODEL=claude-opus-4-8
57
57
```
58
58
@@ -61,15 +61,15 @@ LLM_MODEL=claude-opus-4-8
61
61
Edit `.env`, then **restart** so it's re-read:
62
62
63
63
-**Web demo:** restart `npm run dev` (the proxy reads `.env` at startup).
64
-
-**CoralOS round:** just re-run `npm run coral`—`coral/round.ts` reads `.env` and passes the keys to
64
+
-**CoralOS round:** just re-run `npm run coral`-`coral/round.ts` reads `.env` and passes the keys to
65
65
the agents in the session request, so coral-server launches them with the new provider/key.
66
66
67
67
## "It says `deterministic`, not `LLM`"
68
68
69
69
The model didn't return. Almost always the key:
70
70
71
71
- not set / wrong key, or
72
-
-**out of credits**— Anthropic returns `400 … credit balance is too low`. Top up, swap the key, or
72
+
-**out of credits**- Anthropic returns `400 ... credit balance is too low`. Top up, swap the key, or
73
73
switch to OpenAI (above). Then restart.
74
74
75
75
Run with `TRACE=1` in `.env` to see exactly which provider/model was used and the raw reply.
This tracks the two remaining judge-facing weaknesses after the CoralOS arbiter alignment work:
4
+
5
+
1. Some older docs/comments contain mojibake, mostly from copied arrows/dashes.
6
+
2. The arbiter is a single trusted keypair, so the repo language must not overclaim.
7
+
8
+
## Priority
9
+
10
+
| Priority | Issue | Why It Matters | Fix |
11
+
|---|---|---|---|
12
+
| P0 | Mojibake in docs/comments | It makes the repo look rushed even when the system is strong. | Normalize docs and comments to clean ASCII or valid UTF-8. |
13
+
| P1 | Centralized arbiter language | A sharp judge can challenge overbroad settlement claims. | Make language precise and consistent. |
14
+
15
+
## P0: Mojibake Cleanup
16
+
17
+
**Goal:** the repo should read cleanly in GitHub, terminals, and IDEs.
0 commit comments