Feat/canonical model and tool formats#92
Open
Nivesh353 wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Standardizes two declarative formats in the gitagent spec so exported agents
work correctly on downstream runtimes (notably gitagent, which silently
dropped tools/models in the old formats):
provider:model(e.g.anthropic:claude-sonnet-4-6)implementationnow usesscript:(withpath:kept as a deprecated alias)1. Canonical
provider:modelmodel formatmodel.preferred/model.fallbackmust now beprovider:model— bare names(
gpt-4o) are rejected. A sharedparseModel()util (splits on the first colon)replaces the per-adapter provider-guessing logic.
src/utils/model.ts—parseModel(),KNOWN_PROVIDERS,isKnownProvider()agent-yaml.schema.jsonenforces^[a-z0-9-]+:.+$on preferred/fallbackprovider/modelfor opencode/github/nanobot/openclaw;{id, provider}for gemini;passthrough for gitclaw). Deleted the old
inferProvider/mapModelNameguessers.provider:modelagent.yamlfiles + spec/docs examples2. Tool
implementation.scripttype: scripttools now usescript:(the form gitagent's runtime reads).path:is still accepted but deprecated.tool.schema.jsonaddsscript, deprecatespath, requires one-of +runtimeBreaking change
Agents with bare model names (
gpt-4o) or no provider prefix will now failvalidation. Migrate to
provider:model(e.g.openai:gpt-4o). Toolpath:remains valid but should migrate to
script:for gitagent compatibility.