Changesets · Branches · Tags · Compare
| Changeset | 272fbbb9c88e67f996aec0c5b315f04b99d222cfd05faf7dd144af3b14e80786 |
|---|---|
| Author | Patrick Erichsen <patrick.a.erichsen@gmail.com> · 2025-09-23 10:51 -07:00 |
| Committer | Patrick Erichsen <patrick.a.erichsen@gmail.com> · 2025-09-23 10:51 -07:00 |
| Parents | 2cb7a36ca613 |
1 file changed
modified docs/guides/configuring-models-rules-tools.mdx +46 −38
| @@ -50,6 +50,25 @@ | ||
| 50 | 50 | |
| 51 | 51 | </Columns> |
| 52 | 52 | |
| 53 | +## Hub | |
| 54 | + | |
| 55 | +Continue hub uses a slug in the format of `owner/item-name` to resolve blocks. | |
| 56 | + | |
| 57 | +For example, to use the [Claude 4 Sonnet model](https://hub.continue.dev/anthropic/claude-4-sonnet), you'd reference it as `anthropic/claude-4-sonnet`. | |
| 58 | + | |
| 59 | +Import from the hub using the `uses` syntax alongside your custom configurations: | |
| 60 | + | |
| 61 | +```yaml config.yaml highlight={6} | |
| 62 | +name: Team Agent | |
| 63 | +version: 1.0.0 | |
| 64 | +schema: v1 | |
| 65 | + | |
| 66 | +models: | |
| 67 | + - uses: anthropic/claude-4-sonnet | |
| 68 | + with: | |
| 69 | + ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} # Use a hub secret | |
| 70 | +``` | |
| 71 | + | |
| 53 | 72 | ### Organization |
| 54 | 73 | |
| 55 | 74 | Organize your local configurations using these directories: |
| @@ -70,7 +89,13 @@ | ||
| 70 | 89 | |
| 71 | 90 | ## Working with Secrets |
| 72 | 91 | |
| 73 | -Local configurations can use mustache notation for secrets (`${{ secrets.SECRET_NAME }}`) which read from: | |
| 92 | +Models, and many MCP servers, require a secret for things like API keys. | |
| 93 | + | |
| 94 | +On the hub, you can configure secrets when adding a model or MCP server. | |
| 95 | + | |
| 96 | +This will use mustache notation to pass the secret, eg `${{ secrets.SECRET_NAME }}` | |
| 97 | + | |
| 98 | +When configuring a local model or MCP server, you can use the same mustache notation for secrets which read from: | |
| 74 | 99 | |
| 75 | 100 | <Columns cols={2}> |
| 76 | 101 | <Card title="Global" icon="globe"> |
| @@ -82,26 +107,11 @@ | ||
| 82 | 107 | </Card> |
| 83 | 108 | </Columns> |
| 84 | 109 | |
| 85 | -## Inputs and Customization | |
| 86 | - | |
| 87 | -Configurations can accept user inputs for customization by defining an `${{ inputs.SECRET_NAME }}` value. | |
| 88 | - | |
| 89 | -For example, here is how you could require that the user provide a value for the `apiKey` property on a model: | |
| 90 | - | |
| 91 | -```yaml title="config.yaml" highlight={8} | |
| 92 | -name: myprofile/custom-model | |
| 93 | -version: 1.0.0 | |
| 94 | -schema: v1 | |
| 95 | - | |
| 96 | -models: | |
| 97 | - - name: My Favorite Model | |
| 98 | - # ... other model properties ... | |
| 99 | - apiKey: ${{ inputs.SECRET_NAME }} | |
| 100 | -``` | |
| 110 | +## Overriding Properties | |
| 101 | 111 | |
| 102 | -Users then map their secret to this input using a `${{ secrets.SECRET_NAME }}` value that maps to a property name which matches the required input, e.g. `SECRET_NAME`. Note that on the hub, this mapping is created automatically for you. | |
| 112 | +You can directly override properties using the `override` syntax: | |
| 103 | 113 | |
| 104 | -```yaml title="config.yaml" highlight={8} | |
| 114 | +```yaml title="config.yaml" highlight={10-13} | |
| 105 | 115 | name: myprofile/custom-agent |
| 106 | 116 | version: 1.0.0 |
| 107 | 117 | schema: v1 |
| @@ -109,33 +119,35 @@ | ||
| 109 | 119 | models: |
| 110 | 120 | - uses: myprofile/custom-model |
| 111 | 121 | with: |
| 112 | - SECRET_NAME: ${{ secrets.SECRET_NAME }} | |
| 122 | + ANTHROPIC_API_KEY: ${{ secrets.MY_ANTHROPIC_API_KEY }} | |
| 123 | + TEMP: 0.9 | |
| 124 | + override: | |
| 125 | + roles: | |
| 126 | + - chat | |
| 113 | 127 | ``` |
| 114 | 128 | |
| 115 | -Note that hub secrets can be passed as inputs using the mustache format: `${{ secrets.SECRET_NAME }}`. | |
| 129 | +## Advanced | |
| 116 | 130 | |
| 117 | -## Hub | |
| 131 | +### Inputs | |
| 118 | 132 | |
| 119 | -Hub items are identified by slugs in the format `owner/item-name`. For example, to use the [Claude 4 Sonnet model](https://hub.continue.dev/anthropic/claude-4-sonnet), you'd reference it as `anthropic/claude-4-sonnet`. | |
| 133 | +Models and MCP server authors can configure inputs that require the user to provide a secret value by defining a `${{ inputs.SECRET_NAME }}` value. | |
| 120 | 134 | |
| 121 | -Import from the hub using the `uses` syntax alongside your custom configurations: | |
| 135 | +For example, here is how you could require that the user provide a value for the `apiKey` property on a model: | |
| 122 | 136 | |
| 123 | -```yaml config.yaml highlight={6} | |
| 124 | -name: Team Agent | |
| 137 | +```yaml title="config.yaml" highlight={8} | |
| 138 | +name: myprofile/custom-model | |
| 125 | 139 | version: 1.0.0 |
| 126 | 140 | schema: v1 |
| 127 | 141 | |
| 128 | 142 | models: |
| 129 | - - uses: anthropic/claude-4-sonnet | |
| 130 | - with: | |
| 131 | - ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} # Use a hub secret | |
| 143 | + - name: My Favorite Model | |
| 144 | + # ... other model properties ... | |
| 145 | + apiKey: ${{ inputs.SECRET_NAME }} | |
| 132 | 146 | ``` |
| 133 | 147 | |
| 134 | -## Overriding Properties | |
| 135 | - | |
| 136 | -You can directly override properties using the `override` syntax: | |
| 148 | +Users then map their secret to this input using a `${{ secrets.SECRET_NAME }}` value that maps to a property name which matches the required input, e.g. `SECRET_NAME`. | |
| 137 | 149 | |
| 138 | -```yaml title="config.yaml" highlight={10-13} | |
| 150 | +```yaml title="config.yaml" highlight={8} | |
| 139 | 151 | name: myprofile/custom-agent |
| 140 | 152 | version: 1.0.0 |
| 141 | 153 | schema: v1 |
| @@ -143,11 +155,7 @@ | ||
| 143 | 155 | models: |
| 144 | 156 | - uses: myprofile/custom-model |
| 145 | 157 | with: |
| 146 | - ANTHROPIC_API_KEY: ${{ secrets.MY_ANTHROPIC_API_KEY }} | |
| 147 | - TEMP: 0.9 | |
| 148 | - override: | |
| 149 | - roles: | |
| 150 | - - chat | |
| 158 | + SECRET_NAME: ${{ secrets.SECRET_NAME }} | |
| 151 | 159 | ``` |
| 152 | 160 | |
| 153 | 161 | ## Next Steps |