文件历史

16 次代码提交

作者 SHA1 备注 提交日期
Simon Willison 29fa823146 response-reply-chain.md plan 2026-04-15 15:07:53 -07:00
Simon Willison 51157044d0 DAG phase 5: docs — storage model note + implementation status
- plans/parts/plugin-upgrade-guide.md gains a "Storage: the DAG
  message store (transparent to plugins)" section. Highlights the
  two things plugin authors actually need to know: provider_metadata
  is part of message identity (so echo it verbatim), and floats in
  provider_metadata are rejected at hash time.
- plans/dag-schema.md's "Suggested implementation sequence" is
  replaced with an "Implementation status" section reflecting what
  actually shipped across the five commits, plus a Deferred section
  listing llm logs tree view, full provider-adapter DAG reads, and
  the eventual drop of responses writes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 08:30:01 -07:00
Simon Willison 3bf5606b5a DAG phase 1: canonical message serialization + content hash
Adds llm/_canonical.py with canonical_message_json() and
message_content_hash(). The serialization is the hash contract for the
incoming DAG-shaped message store; snapshot tests in
tests/test_canonical.py pin the wire format.

The include_provider_metadata parameter is threaded through now so a
future semantic_hash column can be added without refactoring
(see plans/dag-provider-metadata-hashing.md).

Also commits the design docs:
- plans/dag-schema.md — full DAG storage design
- plans/dag-provider-metadata-hashing.md — Option 1 now, Option 2 later

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 08:12:45 -07:00
Simon Willison 27ae328ea0 Plugin Upgrade Guide: StreamEvent and Messages 2026-04-14 07:51:58 -07:00
Simon Willison f773ab2fa4 Formatting and type annotation fixes 2026-04-12 17:31:21 -07:00
Simon Willison 9a44bb29c6 Add option 8 (short names in llm.parts) to sugar ideas, update recommendation
New option: from llm.parts import Text then Text.system("..."),
Text.user("..."). Combined with role classmethods this is very
concise. Notes the Attachment/ToolCall name collision issue.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 08:19:52 -07:00
Simon Willison 4a2d4bc31f Add syntactic sugar ideas for parts=[] API
Seven options explored: role-based classmethods, top-level shortcuts,
chainable builder, tuples, dicts, hybrid, and messages= alias.
Recommends starting with classmethods then adding llm.user()/system()
shortcuts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 08:15:27 -07:00
Simon Willison ed223991cf Update plugin upgrade guide with lessons from llm-mistral conversion
Add notes about: requiring response.add_tool_call() alongside StreamEvents
for tool calls, yield from limitation in async generators, filtering empty
text chunks, and astream_events() vs stream_events() for async.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 09:06:02 -07:00
Simon Willison 2949373d50 Add generic plugin upgrade guide for StreamEvent/parts support
Covers: importing StreamEvent, converting yield str to yield
StreamEvent for text/reasoning/tool calls/server-side tools, part
index tracking, handling opaque reasoning tokens, testing patterns,
and the special case of plugins that inherit from built-in models.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 08:55:16 -07:00
Simon Willison 3be4505317 Add TODO about spurious space TextPart from Anthropic tool workaround
Documents the " " space character that gets persisted as a real
TextPart when the Anthropic plugin works around a text-joining bug
in tool call chains. Lists four options to fix, recommends moving
the spacing concern to the display layer.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 08:07:02 -07:00
Simon Willison 2c3d966262 Final implementation notes for all 5 phases
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 07:42:49 -07:00
Simon Willison fe4243710b Update implementation notes with Phase 3 observations
Documents findings from all three plugin implementations: OpenAI
(set_usage mutation, opaque reasoning), Anthropic (streamed thinking,
server-side tools), Gemini (opaque thinking, complete parts per chunk).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 07:35:32 -07:00
Simon Willison 9e0c213ba4 Add implementation notes from Phase 1 and Phase 2
Documents design decisions, live testing observations against
gpt-5.4-mini, and things to watch for in Phase 3.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 23:24:42 -07:00
Simon Willison 8f98ff725e Plan by Claude Code 2026-04-04 23:08:36 -07:00
Simon Willison ad4f83c794 Ignore the research directory 2026-04-04 09:44:02 -07:00
Simon Willison 10703b7e03 Initial overview for LLM plans project 2026-04-04 09:41:26 -07:00