SEP: say whether `durationMs` and `timeoutMs` are integers; SDKs disagree and do not interoperate
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Ambito
- api, backend-api-design
Direzione di ricerca
The mismatch lives in the SEP text at docs/sep.md (the durationMs and timeoutMs field types and the timeoutMs: 5000 example) and in the SDK wire types: go/sdk/interceptors/wire.go and csharp/sdk/src/ModelContextProtocol.Interceptors/Protocol/InvokeInterceptorRequestParams.cs and InterceptorResult.cs. Reproduce by serializing a Python float such as 5000.0 into those C# types. Done means the maintainers pick one integer-or-number option, the SEP text states it, and the SDKs agree on it. Because this needs a spec decision first, it is not a good first code change.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The SEP types the millisecond fields as number (durationMs, timeoutMs), and every example uses whole numbers (for instance timeoutMs: 5000). The SDKs have read this differently, and the readings do not interoperate.
| SDK | timeoutMs |
durationMs |
|---|---|---|
| Go | int64 |
int64 |
| C# | int? |
long? |
| Python (#30) | float, sent as 5000.0 |
float, sent as e.g. 0.0072 |
Effect. System.Text.Json throws JsonException when it reads {"timeoutMs":5000.0} into int? or {"durationMs":0.0072} into long? (tested on .NET 10 with a class that uses the same field types). So a C# invoker cannot read any result from a Python interceptor server, and a C# server rejects any Python request that carries timeoutMs. Go's encoding/json is expected to reject the same values for int64; that was not run.
Options.
- Say in the SEP that both fields are integer milliseconds. This matches every example in the text and the Go and C# SDKs; Python would round on send.
- Keep
numberand say that fractional values are allowed. Go and C# would then need to accept them.
Either way, senders could emit integers and receivers could accept any JSON number, which would make the SDKs tolerant of each other regardless of which option is chosen.
Found while reviewing #30.
🤖 Generated with Claude Code
- Lingua principale
- C#
- Stelle
- 24
- Fork
- 16
- Merge medio
- 3m
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di modelcontextprotocol/experimental-ext-interceptors
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
SEP: which severity decides blocking when `valid`, `severity` and `messages[].severity` disagree?Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
-
Python SDK: support `phase="both"` as decorator sugarForse di nuovo libera @olaservo l’ha presa 101 giorni fa e non c’è nessuna pull request aperta. Apertaenhancement
modelcontextprotocol/experimental-ext-interceptors#37 · 1 assegnatario ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
modelcontextprotocol/experimental-ext-interceptors#29 · 2 commenti ·
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
modelcontextprotocol/experimental-ext-interceptors#20 · 1 commento ·
Tutte le issue di modelcontextprotocol/experimental-ext-interceptors
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
fluentmigrator/fluentmigrator#2460 ·
I maintainer di solito rispondono entro 1 giorno
-
hand-to-AI
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
CactuseSecurity/firewall-orchestrator#5803 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
DXF with empty names failsApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 3 giorni
-
bug python
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
ilia-sokolov/OfficeAgent.NET#89 ·
I maintainer di solito rispondono entro 13 giorni