Tags
Creators
Details
1.0.5.2-release+1.21.1
Compatibility
Required content
Changes
Changelog v1.0.5.2-release+1.21.1
This minor update of AI player updates the mod to version 1.21.1 and also brings support for other custom API providers.
Custom OpenAI-Compatible Provider Support
This feature allows you to use alternative AI providers that are compatible with the OpenAI API standard, such as OpenRouter, TogetherAI, Perplexity, and others.
How to Use
1. Enable Custom Provider Mode
Set the system property(JVM argument) when launching the game:
-Daiplayer.llmMode=custom
2. Configure API Settings
- Firstly, delete the existing settings.json5 in the config folder (save any api keys elsewhere for the meantime)
- Open the in-game API Keys configuration screen (
/configMan) and then click the API Keys button. - Set the following fields:
- Custom API URL: The base URL of your provider (e.g.,
https://openrouter.ai/api/v1) - Custom API Key: Your API key for the provider
- Custom API URL: The base URL of your provider (e.g.,
- Hit save. In case you don't see the list of models immediately hit the "Refresh Models" button once or twice.
- If you still don't see the list of models, close the config manager, type
/configManagain and you should see the list of models available. - ollama is still required to be open in the background because of the embedding model being used, but I will separate this entirely in the next mini patch, by adding an embedding api endpoint from the providers, and also upgrading to the
embedddinggemmamodel fromnomic-embed-text
3. Select a Model
The system will automatically fetch available models from your provider's /models endpoint and display them in the model selection interface.
Supported Providers
Any provider that implements the OpenAI API standard should work. Some examples:
- OpenRouter:
https://openrouter.ai/api/v1 - TogetherAI:
https://api.together.xyz/v1 - Perplexity:
https://api.perplexity.ai/ - Groq:
https://api.groq.com/openai/v1 - Local LM Studio:
http://localhost:1234/v1
API Compatibility
The custom provider implementation uses the following OpenAI API endpoints:
GET /models- For fetching available modelsPOST /chat/completions- For sending chat completion requests
Your provider must support these endpoints with the same request/response format as OpenAI's API.
Troubleshooting
- "Custom provider selected but no API URL configured": Make sure you've set the Custom API URL field
- "Custom API key not set in config!": Make sure you've set the Custom API Key field
- Empty model list: Check that your API key is valid and the URL is correct
- Connection errors: Verify that the provider URL is accessible and supports the OpenAI API format
Supplementary resources
| File | Type | Size | |
|---|---|---|---|
| ai-player-1.0.5.2-release+1.21.1-sources.jar | Unknown | 241.77 KiB |
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:sigwtdeA:5T6lnMmL"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:sigwtdeA:5T6lnMmL"
}


